[nb] zotero_tutorial.py: exception: database is locked #557

Closed
opened 2026-07-10 14:32:56 +00:00 by kert · 1 comment
Owner

Auto-filed by the notebook error filer (nb-sig:3aab8bf51604 — do not edit this marker; dedup and auto-close key on it).

  • Notebook: zotero_tutorial.py
  • Error: exception: database is locked
  • Source: nb-integration/all
Traceback (most recent call last):
  File "/tmp/marimo_14041/__marimo__cell_vblA_.py", line 7, in <module>
    for r in db.execute(
             ~~~~~~~~~~^
        "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ).fetchall()
    ^
sqlite3.OperationalError: database is locked

This issue is closed automatically when the error stops occurring.

Auto-filed by the notebook error filer (`nb-sig:3aab8bf51604` — do not edit this marker; dedup and auto-close key on it). - **Notebook:** `zotero_tutorial.py` - **Error:** `exception`: database is locked - **Source:** nb-integration/all ``` Traceback (most recent call last): File "/tmp/marimo_14041/__marimo__cell_vblA_.py", line 7, in <module> for r in db.execute( ~~~~~~~~~~^ "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ).fetchall() ^ sqlite3.OperationalError: database is locked ``` This issue is closed automatically when the error stops occurring.
kert added the notebooks label 2026-07-10 14:32:56 +00:00
Author
Owner

Fixed in 9b58e2dfb2. conf.connect.zotero() opened the db with plain mode=ro, which still participates in SQLite's locking protocol — and the running Zotero app holds that lock almost permanently, so reads failed with 'database is locked'. Now opens with mode=ro&immutable=1 (bypasses locking; documented torn-read trade-off, with immutable=False escape hatch). Verified against the live db with Zotero running.

Fixed in https://git.fhirworx.io/homelab/stack/commit/9b58e2dfb2646b0e8f0eace4b2939657c03518e1. `conf.connect.zotero()` opened the db with plain `mode=ro`, which still participates in SQLite's locking protocol — and the running Zotero app holds that lock almost permanently, so reads failed with 'database is locked'. Now opens with `mode=ro&immutable=1` (bypasses locking; documented torn-read trade-off, with `immutable=False` escape hatch). Verified against the live db with Zotero running.
kert closed this issue 2026-07-10 18:37:35 +00:00
Sign in to join this conversation.