Skip to content

Fix SQLite list type binding error when adding website#1214

Open
majiayu000 wants to merge 1 commit intollmware-ai:mainfrom
majiayu000:fix/sqlite-list-type-binding
Open

Fix SQLite list type binding error when adding website#1214
majiayu000 wants to merge 1 commit intollmware-ai:mainfrom
majiayu000:fix/sqlite-list-type-binding

Conversation

@majiayu000
Copy link

Summary

  • Fixes "Error binding parameter 22: type 'list' is not supported" when using SQLite engine
  • Converts list-type user_tags to JSON strings before SQL parameter binding
  • Applied to both SQLiteWriter and PGWriter for consistency

Test plan

  • Added unit tests for list to JSON conversion
  • Tests cover list conversion, string passthrough, and empty list cases

Fixes #1042

Signed-off-by: majiayu000 1835304752@qq.com

When using SQLite as the database engine and adding a website via
Library.add_website(), the user_tags field (a Python list) was being
passed directly to SQLite, causing "Error binding parameter 22: type
'list' is not supported".

This fix converts list-type user_tags to JSON strings before binding
in both SQLiteWriter and PGWriter.

Fixes llmware-ai#1042

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Error binding parameter 22: type 'list' is not supported" when adding website using sqlite engine

1 participant