You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "../python3.7/site-packages/csvs_to_sqlite/cli.py", line 198, in cli
if replace_tables and table_exists(conn, df.table_name):
File "../python3.7/site-packages/csvs_to_sqlite/utils.py", line 260, in table_exists
[table],
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
How the error is resolved
If the input CSV's table_name header is changed to anything else, e.g. tbl_name, then csvs-to-sqlite works as expected
Suggested fix
Haven't looked at the code yet, but my initial thought is that it'd be nice if csvs-to-sqlite silently handled this somehow, maybe changing table_name (and any other reserved words), to a string with a specified prefix/suffix, e.g. table_name__fixed__. Then again, maybe silently handling this kind of thing can lead to messy usecases later?
The text was updated successfully, but these errors were encountered:
(This is for
csvs-to-sqlite=1.0
, usingPython 3.7
)How to reproduce the error
Given a CSV that has
table_name
as one of its column headers, e.g. this OSHA data dictionary.csvcsvs-to-sqlite
throws an error:How the error is resolved
If the input CSV's
table_name
header is changed to anything else, e.g.tbl_name
, then csvs-to-sqlite works as expectedSuggested fix
Haven't looked at the code yet, but my initial thought is that it'd be nice if csvs-to-sqlite silently handled this somehow, maybe changing
table_name
(and any other reserved words), to a string with a specified prefix/suffix, e.g.table_name__fixed__
. Then again, maybe silently handling this kind of thing can lead to messy usecases later?The text was updated successfully, but these errors were encountered: