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

[WordDumb] sqlite3.OperationalError: database is locked #265

Open
3 tasks done
Cirilo614 opened this issue Sep 24, 2024 · 1 comment
Open
3 tasks done

[WordDumb] sqlite3.OperationalError: database is locked #265

Cirilo614 opened this issue Sep 24, 2024 · 1 comment

Comments

@Cirilo614
Copy link

Checkboxes

  • I have read the installation and usage documents.
  • I have not found similar open/closed issue or disscussion.
  • Reboot doesn't fix the problem.

Describe the bug and copy the error message

Calibre Version: 7.18.0
Operating System: macOS (darwin)
Plugin Version: WordDumb 3.33.0

Issue Description:
An error occurs when generating word hints and X-Ray for the book "Novels2024-Dead Med aka Suicide Med". The error message is as follows:

calibre, version 7.18.0 (darwin, embedded-python: True)
Tonnerre de Brest!: 發生錯誤,請複制錯誤消息,然後在 GitHub 報告錯誤。

Starting job: 正在為《Novels2024-The Teacher》生成生詞提示和X-Ray
Job: "正在為《Novels2024-The Teacher》生成生詞提示和X-Ray" failed with error:
Traceback (most recent call last):
File "calibre/gui2/threaded_jobs.py", line 85, in start_work
File "calibre_plugins.worddumb.parse_job", line 210, in do_job
run_subprocess(args, input_str)
File "calibre_plugins.worddumb.utils", line 50, in run_subprocess
return subprocess.run(
^^^^^^^^^^^^^^^
File "subprocess.py", line 571, in run
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.12/bin/python3', '/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip', '{"book_id": 810, "book_path": "/Users/cirilolin/calibre \u66f8\u5eab/McFadden, Freida/Novels2024-The Teacher (810)/Novels2024-The Teacher - McFadden, Freida_x_ray_word_wise.epub", "mi": null, "book_fmt": "EPUB", "book_lang": "en", "useragent": "WordDumb/3.33.0 (https://github.com/xxyzz/WordDumb)", "plugin_path": "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip", "spacy_model": "en_core_web_lg", "create_ww": true, "create_x": true, "asin": "", "acr": "", "revision": "", "kfx_json": null, "mobi_html": null, "mobi_codec": ""}', '{"search_people": true, "model_size": "lg", "zh_wiki_variant": "tw", "mediawiki_api": "", "add_locator_map": true, "preferred_formats": ["KFX", "AZW3", "AZW", "MOBI", "EPUB"], "use_all_formats": true, "minimal_x_ray_count": 1, "choose_format_manually": false, "wiktionary_gloss_lang": "zh", "kindle_gloss_lang": "zh", "use_wiktionary_for_kindle": true, "remove_link_styles": false, "python_path": "/Library/Frameworks/Python.framework/Versions/3.12/bin/python3", "show_change_kindle_ww_lang_warning": false, "ca_wiktionary_difficulty_limit": 5, "cs_wiktionary_difficulty_limit": 5, "da_wiktionary_difficulty_limit": 5, "de_wiktionary_difficulty_limit": 5, "el_wiktionary_difficulty_limit": 5, "en_wiktionary_difficulty_limit": 5, "es_wiktionary_difficulty_limit": 5, "fi_wiktionary_difficulty_limit": 5, "fr_wiktionary_difficulty_limit": 5, "he_wiktionary_difficulty_limit": 5, "hr_wiktionary_difficulty_limit": 5, "it_wiktionary_difficulty_limit": 5, "ja_wiktionary_difficulty_limit": 5, "ko_wiktionary_difficulty_limit": 5, "lt_wiktionary_difficulty_limit": 5, "mk_wiktionary_difficulty_limit": 5, "nl_wiktionary_difficulty_limit": 5, "no_wiktionary_difficulty_limit": 5, "pl_wiktionary_difficulty_limit": 5, "pt_wiktionary_difficulty_limit": 5, "ro_wiktionary_difficulty_limit": 5, "ru_wiktionary_difficulty_limit": 5, "sl_wiktionary_difficulty_limit": 5, "sv_wiktionary_difficulty_limit": 5, "uk_wiktionary_difficulty_limit": 5, "zh_wiktionary_difficulty_limit": 5, "use_pos": true}']' returned non-zero exit status 1.

Called with args: (ParseJobData(book_id=810, book_path='/Users/cirilolin/calibre 書庫/McFadden, Freida/Novels2024-The Teacher (810)/Novels2024-The Teacher - McFadden, Freida_x_ray_word_wise.epub', mi=<calibre.ebooks.metadata.book.base.Metadata object at 0x160c58090>, book_fmt='EPUB', book_lang='en', useragent='WordDumb/3.33.0 (https://github.com/xxyzz/WordDumb)', plugin_path='/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip', spacy_model='en_core_web_lg', create_ww=True, create_x=True, asin='', acr='', revision='', kfx_json=None, mobi_html=None, mobi_codec=''),) {'notifications': <queue.Queue object at 0x160c50cd0>, 'abort': <threading.Event at 0x160c51390: unset>, 'log': <calibre.utils.logging.GUILog object at 0x160c51990>}
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/main.py", line 37, in
File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/parse_job.py", line 326, in create_files
File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/epub.py", line 273, in modify_epub
File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/mediawiki.py", line 338, in query
File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/mediawiki.py", line 197, in query_extracts_api
File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/mediawiki.py", line 106, in add_cache
sqlite3.OperationalError: database is locked

Plugin settings and reproduce steps

Plugin Settings
Plugin Name: WordDumb
Current Version: 3.33.0
Settings Details:
Selected Language: English (but it keeps changing to Catalan)
Specific Features: Vocabulary hints and X-Ray are enabled
Custom Options: Checked to create files in all available formats.

Steps to Reproduce

  1. Open Calibre.
  2. Import or select the book
  3. Attempt to generate vocabulary hints and X-Ray.
  4. Encounter the following error:
  5. Error Message:
calibre, version 7.18.0 (darwin, embedded-python: True)
Tonnerre de Brest!: 發生錯誤,請複制錯誤消息,然後在 GitHub 報告錯誤。

Starting job: 正在為《Novels2024-The Teacher》生成生詞提示和X-Ray 
Job: "正在為《Novels2024-The Teacher》生成生詞提示和X-Ray" failed with error: 
Traceback (most recent call last):
  File "calibre/gui2/threaded_jobs.py", line 85, in start_work
  File "calibre_plugins.worddumb.parse_job", line 210, in do_job
    run_subprocess(args, input_str)
  File "calibre_plugins.worddumb.utils", line 50, in run_subprocess
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "subprocess.py", line 571, in run
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.12/bin/python3', '/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip', '{"book_id": 810, "book_path": "/Users/cirilolin/calibre \\u66f8\\u5eab/McFadden, Freida/Novels2024-The Teacher (810)/Novels2024-The Teacher - McFadden, Freida_x_ray_word_wise.epub", "mi": null, "book_fmt": "EPUB", "book_lang": "en", "useragent": "WordDumb/3.33.0 (https://github.com/xxyzz/WordDumb)", "plugin_path": "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip", "spacy_model": "en_core_web_lg", "create_ww": true, "create_x": true, "asin": "", "acr": "", "revision": "", "kfx_json": null, "mobi_html": null, "mobi_codec": ""}', '{"search_people": true, "model_size": "lg", "zh_wiki_variant": "tw", "mediawiki_api": "", "add_locator_map": true, "preferred_formats": ["KFX", "AZW3", "AZW", "MOBI", "EPUB"], "use_all_formats": true, "minimal_x_ray_count": 1, "choose_format_manually": false, "wiktionary_gloss_lang": "zh", "kindle_gloss_lang": "zh", "use_wiktionary_for_kindle": true, "remove_link_styles": false, "python_path": "/Library/Frameworks/Python.framework/Versions/3.12/bin/python3", "show_change_kindle_ww_lang_warning": false, "ca_wiktionary_difficulty_limit": 5, "cs_wiktionary_difficulty_limit": 5, "da_wiktionary_difficulty_limit": 5, "de_wiktionary_difficulty_limit": 5, "el_wiktionary_difficulty_limit": 5, "en_wiktionary_difficulty_limit": 5, "es_wiktionary_difficulty_limit": 5, "fi_wiktionary_difficulty_limit": 5, "fr_wiktionary_difficulty_limit": 5, "he_wiktionary_difficulty_limit": 5, "hr_wiktionary_difficulty_limit": 5, "it_wiktionary_difficulty_limit": 5, "ja_wiktionary_difficulty_limit": 5, "ko_wiktionary_difficulty_limit": 5, "lt_wiktionary_difficulty_limit": 5, "mk_wiktionary_difficulty_limit": 5, "nl_wiktionary_difficulty_limit": 5, "no_wiktionary_difficulty_limit": 5, "pl_wiktionary_difficulty_limit": 5, "pt_wiktionary_difficulty_limit": 5, "ro_wiktionary_difficulty_limit": 5, "ru_wiktionary_difficulty_limit": 5, "sl_wiktionary_difficulty_limit": 5, "sv_wiktionary_difficulty_limit": 5, "uk_wiktionary_difficulty_limit": 5, "zh_wiktionary_difficulty_limit": 5, "use_pos": true}']' returned non-zero exit status 1.
 
Called with args: (ParseJobData(book_id=810, book_path='/Users/cirilolin/calibre 書庫/McFadden, Freida/Novels2024-The Teacher (810)/Novels2024-The Teacher - McFadden, Freida_x_ray_word_wise.epub', mi=<calibre.ebooks.metadata.book.base.Metadata object at 0x160c58090>, book_fmt='EPUB', book_lang='en', useragent='WordDumb/3.33.0 (https://github.com/xxyzz/WordDumb)', plugin_path='/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip', spacy_model='en_core_web_lg', create_ww=True, create_x=True, asin='', acr='', revision='', kfx_json=None, mobi_html=None, mobi_codec=''),) {'notifications': <queue.Queue object at 0x160c50cd0>, 'abort': <threading.Event at 0x160c51390: unset>, 'log': <calibre.utils.logging.GUILog object at 0x160c51990>} 
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/__main__.py", line 37, in <module>
  File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/parse_job.py", line 326, in create_files
  File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/epub.py", line 273, in modify_epub
  File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/mediawiki.py", line 338, in query
  File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/mediawiki.py", line 197, in query_extracts_api
  File "/Users/cirilolin/Library/Preferences/calibre/plugins/WordDumb.zip/mediawiki.py", line 106, in add_cache
sqlite3.OperationalError: database is locked
  1. Additional Information
    Operating System: macOS
    Calibre Version: 7.18.0 (darwin, embedded-python: True)

Generated files, screenshots or videos

No response

@xxyzz
Copy link
Owner

xxyzz commented Sep 24, 2024

Please delete /Users/cirilolin/Library/Preferences/calibre/plugins/worddumb-mediawiki/en.wikipedia.org.db and try again.

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