dogsheep / twitter-to-sqlite

Save data from Twitter to a SQLite database
Apache License 2.0
403 stars 20 forks source link

Fall back to FTS4 if FTS5 is not available #47

Open hpk42 opened 4 years ago

hpk42 commented 4 years ago

got this with version 0.21.1 from pypi. twitter-to-sqlite auth worked but then "twitter-to-sqlite user-timeline USER.db" produced a tracekback ending in "no such module: FTS5".

simonw commented 4 years ago

That means your version of SQLite is old enough that it doesn't support the FTS5 extension.

Could you share what operating system you're running, and what the output is that you get from running this?

python -c 'import sqlite3; print(sqlite3.connect(":memory:").execute("select sqlite_version()").fetchone()[0])'

I can teach this tool to fall back on FTS4 if FTS5 isn't available.

hpk42 commented 4 years ago

It's the one with python3.7::

>>> sqlite3.sqlite_version
'3.11.0'

On Wed, Jun 17, 2020 at 10:24 -0700, Simon Willison wrote:

That means your version of SQLite is old enough that it doesn't support the FTS5 extension.

Could you share what operating system you're running, and what the output is that you get from running this?

python -c 'import sqlite3; print(sqlite3.connect(":memory:").execute("select sqlite_version()").fetchone()[0])'

I can teach this tool to fall back on FTS4 if FTS5 isn't available.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/dogsheep/twitter-to-sqlite/issues/47#issuecomment-645512127

simonw commented 4 years ago

I've now figured out how to compile specific SQLite versions to help replicate this problem: https://github.com/simonw/til/blob/master/sqlite/ld-preload.md

Next step: replicate the problem!