-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
Unable to open database file #123
Comments
I'm on macOS and seeing something similar. I'm seeing "sqlite3.OperationalError: table sqlite_master may not be modified" after LLM run and echoes everything. |
This issue is so frustrating. It's because macOS ships a version of SQLite that is locked down to the point that it's enable to execute advanced alter table statements. There are a few workarounds:
That second option is probably what you need. The reason it works is that
I should probably update LLM (or |
Should |
Hi, I am having this issue with a fresh install via either
A quick fix to prevent the crash is to manually create the diff --git a/llm/cli.py b/llm/cli.py
index ac3b3dc..ce47b74 100644
--- a/llm/cli.py
+++ b/llm/cli.py
@@ -254,6 +254,7 @@ def prompt(
# Log to the database
if (logs_on() or log) and not no_log:
log_path = logs_db_path()
+ log_path.mkdir(parents=True, exist_ok=True)
db = sqlite_utils.Database(log_path)
migrate(db)
response.log_to_db(db) But as I understand this ticket, this isn't a real fix, as the root issue here is python pointing at an older version of sqlite3 than is otherwise available (in my case, via |
Fixed it for me as well. Thanks! |
I did some reading up on this and the following will (I think), when added to a startup profile like type brew &>/dev/null && brew ls --versions sqlite > /dev/null && export PATH="$(brew --prefix sqlite)/bin:$PATH" I tested this with a fresh llm installation and confirmed that it is a good fix for me. I think for users who install llm via |
This should be fixed in the latest LLM. Please re-open this issue if you run into the same problem again. |
For this fix: - simonw/sqlite-utils#577 Refs #60, #116, #123
Install and first run is successful but looks like problem with the logging function. Error is as below:
Also when I llm logs off I get:
The text was updated successfully, but these errors were encountered: