Skip to content
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

fts_au trigger causing "<class 'sqlite3.DatabaseError'>: database disk image is malformed" #125

Open
Silthanis opened this issue Jan 14, 2022 · 3 comments

Comments

@Silthanis
Copy link

Again, on Debian 11 "Bullseye" with Python 3.9

No feed items are added on feed update. Server output is attached below.

Deleting the ft_au trigger in rss.db allows the feed to update, but will presumably break full text search.

server.log

@fazalmajid
Copy link
Owner

Unfortunately the error says "database disk image is malformed", which does not give much hints as to what is wrong. Is your build of SQLite enabled with fts5? How did you install it? You can find out by running:

echo "pragma compile_options;" | sqlite3 | grep FTS

You've been experiencing a great many problems with this, and I apologize for that. Would you be willing to try a Docker version instead? I never finished it, but hopefully it would yield more deterministic results.

@Silthanis
Copy link
Author

The message is really generic, which is why it took me a while to trace it as far as the ft_au trigger. Unfortunately, I'm not familiar enough with sqlite3 to take it much past that.

It's Debian's stable packaged version of sqlite3, and does appear to be fts5 enabled:

$ echo "pragma compile_options;" | sqlite3 | grep FTS
ENABLE_FTS3
ENABLE_FTS3_PARENTHESIS
ENABLE_FTS3_TOKENIZER
ENABLE_FTS4
ENABLE_FTS5

I generally prefer to avoid Docker if I can. Since I'm just running this for myself at this point it's one thing for me to trust the Debian maintainers with security, but quite another to trust the entire chain of docker images chosen by the developer of each program I run. I understand that Docker is easier on the developer to support and that temboz was written first and foremost to make your life easier rather than harder, though, so if you don't want to go down this road I get it.

This looks to be the last issue though, after which I'm planning to start working on - and hopefully contributing back - a bayesian scoring plugin. scikit-learn looks promising for that. My hope is to use the score for sorting and/or filtering.

@fazalmajid
Copy link
Owner

FYI I just fixed some bugs with the search functionality. I doubt they have any relation with this issue but worth trying out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants