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
sqlite3.OperationalError: table sqlite_master may not be modified #60
Comments
Urgh, this issue has cropped up before here: It's caused by a locked down version of Python and sqlite3 on macOS.
Actually no, that won't work because |
@Tinche do you get the same problem if you install using Homebrew?
That should come with a copy of Python that doesn't have this problem. |
I was able to replicate this on my own Mac like so. First I figured out the path to the macOS type -a python3
Then I installed /usr/bin/python3 -m pip install llm Then ran LLM_LOG_PATH=/tmp/tmp.db /usr/bin/python3 -m llm init-db Then tried running a prompt:
Truncated output:
|
Here's a workaround that seems to work right now, using an experimental branch of llm install sqlean.py
llm uninstall sqlite-utils
llm install https://github.com/simonw/sqlite-utils/archive/refs/heads/sqlean.zip On my machine that fixes the issue, as far as I can tell. |
Hm, the brew solution didn't work for me:
The Python that was being used by pipx was installed via asdf, not sure if that matters. Back to pipx, the
The latest public version of I tried:
But no luck, still the same issue. Sorry for all this trouble 🙈 |
Closes #559 Closes #235 Refs simonw/llm#60 - Uses `sqlean` in place of `sqlite3` if `sqlean.py` is installed - Uses `sqlite-dump` if available and `conn.iterdump()` does not exist - New `with db.ensure_autocommit_off()` method for ensuring autocommit is off, used by `enable_wal()` and `disable_wal()`.
Aah yes, that I'm publishing a new release of |
Refs #235, #559, #560 Refs simonw/llm#60 Refs nalgeon/sqlean.py#1
OK, the new fix for this should be installing the latest |
Yep, that fixed it. Thanks! |
Even better fix: |
For this fix: - simonw/sqlite-utils#577 Refs #60, #116, #123
Howdy,
on llm 0.4.1, installed via pipx on 3.11, on a Mac. After running
llm init-db
,llm logs
throws:Let me know if I can help further!
The text was updated successfully, but these errors were encountered: