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

The lemma language cannot be changed, and it always shows Catalan. #210

Closed
3 tasks done
jerryberba opened this issue Apr 23, 2024 · 4 comments
Closed
3 tasks done

Comments

@jerryberba
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

The lemma language cannot be changed, and it always shows Catalan. I have tried reinstalling both Calibre and the plug-in, but without success. I am unable to generate word-wise information in the relevant ebook. Could you please let me know if there is any way to fix this issue?

Plugin settings and reproduce steps

  1. Click on "Preferences."
  2. Select "Customize Kindle Word Wise."
  3. Attempt to change the gloss language to Chinese and the lemma language to English.
  4. Click "OK" and observe that the changes cannot be made.

Generated files, screenshots or videos

螢幕擷取畫面 2024-04-23 232839

@xxyzz
Copy link
Owner

xxyzz commented Apr 24, 2024

The choose of lemma language is not saved to the config file, only gloss language is saved. Lemma language is depend on the book language, users only need to decide which word wise gloss language should be used.

@jerryberba
Copy link
Author

Sorry, an additional error was found in my calibre. Might you help advise if it could be solved? Thanks!

calibre, version 7.9.0 (win32, embedded-python: True)
Tonnerre de Brest!: An error occurred, please copy error message then report bug at GitHub.

Starting job: Generating Word Wise for The Power of Geography
Job: "Generating Word Wise for The Power of Geography" 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 201, in do_job
File "calibre_plugins.worddumb.utils", line 52, in run_subprocess
File "subprocess.py", line 571, in run
subprocess.CalledProcessError: Command '['py', 'C:\Users\user\AppData\Roaming\calibre\plugins\WordDumb.zip', '{"book_id": 69, "book_path": "C:\\Users\\user\\Calibre Library\\Tim Marshall\\The Power of Geography (69)\\The Power of Geography - Tim Marshall.azw3", "mi": null, "book_fmt": "AZW3", "book_lang": "en", "useragent": "WordDumb/3.31.2 (https://github.com/xxyzz/WordDumb)", "plugin_path": "C:\\Users\\user\\AppData\\Roaming\\calibre\\plugins\\WordDumb.zip", "spacy_model": "en_core_web_trf", "create_ww": true, "create_x": false, "asin": "BB2T0P6DWB", "acr": "The_Power_of_Geography", "revision": "05028de7", "kfx_json": null, "mobi_html": null, "mobi_codec": "utf-8"}', '{"use_pos": true, "search_people": true, "model_size": "md", "zh_wiki_variant": "hk", "fandom": "", "add_locator_map": true, "preferred_formats": ["AZW3", "MOBI", "KFX", "AZW", "EPUB"], "use_all_formats": false, "minimal_x_ray_count": 1, "choose_format_manually": true, "wiktionary_gloss_lang": "zh", "kindle_gloss_lang": "zh", "use_gpu": true, "cuda": "cu121", "use_wiktionary_for_kindle": true, "remove_link_styles": false, "python_path": "", "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}']' returned non-zero exit status 1.

Called with args: (ParseJobData(book_id=69, book_path='C:\Users\user\Calibre Library\Tim Marshall\The Power of Geography (69)\The Power of Geography - Tim Marshall.azw3', mi=<calibre.ebooks.metadata.book.base.Metadata object at 0x000001C15C941350>, book_fmt='AZW3', book_lang='en', useragent='WordDumb/3.31.2 (https://github.com/xxyzz/WordDumb)', plugin_path='C:\Users\user\AppData\Roaming\calibre\plugins\WordDumb.zip', spacy_model='en_core_web_trf', create_ww=True, create_x=False, asin='BB2T0P6DWB', acr='The_Power_of_Geography', revision='05028de7', kfx_json=None, mobi_html=None, mobi_codec='utf-8'),) {'notifications': <queue.Queue object at 0x000001C14E7F3650>, 'abort': <threading.Event at 0x1c15c93f550: unset>, 'log': <calibre.utils.logging.GUILog object at 0x000001C15C93D750>}
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\user\AppData\Roaming\calibre\plugins\WordDumb.zip_main
.py", line 37, in
File "C:\Users\user\AppData\Roaming\calibre\plugins\WordDumb.zip\parse_job.py", line 227, in create_files
File "C:\Users\user\AppData\Roaming\calibre\plugins\WordDumb.zip\parse_job.py", line 753, in load_spacy
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\spacy_init
.py", line 6, in
from .errors import setup_default_warnings
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\spacy\errors.py", line 3, in
from .compat import Literal
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\spacy\compat.py", line 4, in
from thinc.util import copy_array
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\thinc_init_.py", line 5, in
from .config import registry
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\thinc\config.py", line 5, in
from .types import Decorator
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\thinc\types.py", line 25, in
from .compat import cupy, has_cupy
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\thinc\compat.py", line 35, in
import torch
File "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\torch_init_.py", line 130, in
raise err
OSError: [WinError 127] Ҳָij Error loading "C:\Users\user\AppData\Roaming\calibre\plugins\worddumb-libs-py3.12\torch\lib\cufftw64_11.dll" or one of its dependencies.

@xxyzz
Copy link
Owner

xxyzz commented Apr 25, 2024

You probably need to downgrade CUDA to 12.1, please see #162

@jerryberba
Copy link
Author

Thank you so much! This function is really useful, and I cannot express how grateful I am.

@xxyzz xxyzz closed this as completed Apr 26, 2024
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