Chris1320 / Chris1320/TagStudio-CreativeFlow-AutoTag

sqlite3.OperationalError: database is locked

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

This happens when TagStudio is being used while the script is running.

Traceback (most recent call last):
  File "C:\Projects\TagStudio-CreativeFlow-AutoTag\tscf_autotag.py", line 1305, in <module>
    main(
    ~~~~^
        library_path=args.library_path,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<17 lines>...
        verbose=args.verbose,
        ^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Projects\TagStudio-CreativeFlow-AutoTag\tscf_autotag.py", line 1126, in main
    update_entry_tags(
    ~~~~~~~~~~~~~~~~~^
        library_path=library_path,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
        remove_current_tags=remove_current_tags,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Projects\TagStudio-CreativeFlow-AutoTag\tscf_autotag.py", line 431, in update_entry_tags
    conn.commit()
    ~~~~~~~~~~~^^
sqlite3.OperationalError: database is locked

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tscf_autotag.py at update_entry_tags, especially line 431 where conn.commit() raises the error. Reproduce the script while TagStudio is being used and inspect the database update flow. Done means the script can update tags without raising sqlite3.OperationalError: database is locked.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.