wagtail: no such module: fts5
Issue Summary
site-packages\django\db\backends\sqlite3\base.py", line 421, in execute return Database.Cursor.execute(self, query) django.db.utils.OperationalError: no such module: fts5
Steps to Reproduce
- Start a new project with
wagtail start myproject - manage.py migrate
Technical details
Python 3.7.6 Django 3.2.10 wagtail 2.15.1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (1 by maintainers)
Commits related to this issue
- Fix Sqlite FTS5 compatibility check As per https://github.com/wagtail/wagtail/issues/7798#issuecomment-1021544265 - the direct query against the sqlite3 library will fail with sqlite3.OperationalErro... — committed to gasman/wagtail by gasman 2 years ago
- Fix Sqlite FTS5 compatibility check As per https://github.com/wagtail/wagtail/issues/7798#issuecomment-1021544265 - the direct query against the sqlite3 library will fail with sqlite3.OperationalErro... — committed to wagtail/wagtail by gasman 2 years ago
- Fix Sqlite FTS5 compatibility check As per https://github.com/wagtail/wagtail/issues/7798#issuecomment-1021544265 - the direct query against the sqlite3 library will fail with sqlite3.OperationalErro... — committed to wagtail/wagtail by gasman 2 years ago
- Fix Sqlite FTS5 compatibility check As per https://github.com/wagtail/wagtail/issues/7798#issuecomment-1021544265 - the direct query against the sqlite3 library will fail with sqlite3.OperationalErro... — committed to wagtail/wagtail by gasman 2 years ago
At this point this is extremely difficult to replicate, since you need an environment that’s old enough to not have sqlite-with-fts5 baked in, but new enough to evade the >3.19 version check, and new enough to let you install Python>=3.6 at all. The best I could do was to spin up an Ubuntu 16.04 instance in Vagrant and fake the sqlite version…
This does indeed fail with
sqlite3.OperationalError: no such module: fts5, and updating thefts5_availablefunction to catchsqlite3.OperationalErrorinstead ofdjango.db.OperationalErrorfixes it. PR incoming…