-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deterministic=True
fails on versions of SQLite prior to 3.8.3
#408
Comments
I thought I'd made it so |
Here's the code in question: sqlite-utils/sqlite_utils/db.py Lines 384 to 394 in 521921b
It's checking for Python 3.8, because that's the version of Python that added the But from your error message it looks like it should be checking the SQLite version too. |
deterministic=True
fails on versions of SQLite prior to 3.8.3
Here's the SQLite changelog mentioning that it was added in 3.8.3: https://www.sqlite.org/changes.html#version_3_8_3 |
I need a |
Thanks @simonw I will test it after my vacation 👍 |
Now I get this:
Dockerfile
|
Hi, love your work.
I am unable to lookup indexes in a database using sqlite-utils:
sqlite-utils indexes city_spec.db --table
or
sqlite-utils indexes city_spec.db MyTable
Software
sqlite-utils, version 3.24
sqlite3 --version: 3.36.0
Output:
Traceback (most recent call last):
File "/opt/app-root/bin/sqlite-utils", line 8, in
sys.exit(cli())
File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/app-root/lib64/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/app-root/lib64/python3.8/site-packages/sqlite_utils/cli.py", line 2123, in indexes
ctx.invoke(
File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/app-root/lib64/python3.8/site-packages/sqlite_utils/cli.py", line 1624, in query
db.register_fts4_bm25()
File "/opt/app-root/lib64/python3.8/site-packages/sqlite_utils/db.py", line 403, in register_fts4_bm25
self.register_function(rank_bm25, deterministic=True)
File "/opt/app-root/lib64/python3.8/site-packages/sqlite_utils/db.py", line 399, in register_function
register(fn)
File "/opt/app-root/lib64/python3.8/site-packages/sqlite_utils/db.py", line 392, in register
self.conn.create_function(name, arity, fn, **kwargs)
sqlite3.NotSupportedError: deterministic=True requires SQLite 3.8.3 or higher
The text was updated successfully, but these errors were encountered: