Open colinatkepler opened 1 month ago
I'll add, in case anyone else has this problem, that my workaround is to try/except on IndexError for the db.create
statement, and if it's raised, I manually drop the index, re-rung the db.create
statement, and then run create_index
again.
I also tried manually setting the index_name
to something without underscores, so I guess underscores don't matter.
I'm using this project (sqlite_minutils) as a part of a FastHTML web app and came across a bug. I used
python=3.12
andsqlite-minutils==3.37.0.post3
. Here's a minimal reproduction:To reproduce, simply first comment out
time_check: str
and the index ontime_check
, runpython script.py
. Then uncommenttime_check
and its index creation and re-runpython script.py
. You will get the following error, which is caused by the query returning nothing, and the index[0]
trying to grab what isn't there.It looks like the parameter substitution fails when there is an extra underscore from the column name. If I do the same query manually using the
?
substitution syntax it works, and if I do the query manually typing out the index name verbatim it also works.