Checkboxes
- [X] I have read the README file.
- [X] I have not found similar issue or disscussion at GitHub.
Describe the bug
WordDumb Fail to use GPU to create X-Ray file (when CUDA is disabled everything works fine).
A fresh installation of the plugin installs
worddumb-libs-py3.8, worddumb-libs-py3.10, worddumb-wikimedia
in Calibre plugin directory.
But Python 3.8 is invoked instead of Python 3.10 (which I think is required, per your documentation).
If that is relevant, a separate Python 3.10 directory is in my OS PATH.
System Information
OS: Windows 10 Pro 64bit
Calibre: version 6.9.0 64bit
Python: version 3.10.8 64bit
Plugin: version 3.27.1 (+"space in user name" patch)
Error message
calibre, version 6.9.0 (win32, embedded-python: True)
Tonnerre de Brest!: Une erreur s'est produite, veuillez copier le message d'erreur et rapportez le problème à GitHub.
Starting job: Générant X-Ray pour The Mythical Man-Month
Job: "Générant X-Ray pour The Mythical Man-Month" failed with error:
Traceback (most recent call last):
File "calibre\gui2\threaded_jobs.py", line 82, in start_work
File "calibre_plugins.worddumb.parse_job", line 162, in do_job
File "calibre_plugins.worddumb.utils", line 47, in run_subprocess
File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['py', 'C:\\Users\\Normand Boivin\\AppData\\Roaming\\calibre\\plugins\\WordDumb.zip', 'BB3J0DJUK4', 'H:\\NB\\Bibliothèque Calibre\\Frederick P. Brooks Jr_\\The Mythical Man-Month (6291)\\The Mythical Man-Month - Frederick P. Brooks Jr_.azw3', 'The_Mythical_Man-Month', '0b9790f2', 'en_core_web_trf', 'en', 'en', 'utf-8', 'WordDumb/3.27.1 (https://github.com/xxyzz/WordDumb)', 'cn', '', 'AZW3', '1', 'C:\\Users\\Normand Boivin\\AppData\\Roaming\\calibre\\plugins\\WordDumb.zip', '', '-x', '-s']' returned non-zero exit status 1.
Called with args: ((6291, 'AZW3', 'H:\\NB\\Bibliothèque Calibre\\Frederick P. Brooks Jr_\\The Mythical Man-Month (6291)\\The Mythical Man-Month - Frederick P. Brooks Jr_.azw3', <calibre.ebooks.metadata.book.base.Metadata object at 0x000001B1952E3C70>, {'spacy': 'en_core_web_', 'wiki': 'en', 'kaikki': 'English', 'gloss': True, 'has_trf': True}), False, True) {'notifications': <queue.Queue object at 0x000001B1952E18D0>, 'abort': <threading.Event object at 0x000001B1952E3940>, 'log': <calibre.utils.logging.GUILog object at 0x000001B1952E3880>}
Traceback (most recent call last):
File "C:\Python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\WordDumb.zip\__main__.py", line 56, in <module>
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\WordDumb.zip\parse_job.py", line 221, in create_files
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\WordDumb.zip\parse_job.py", line 561, in load_spacy
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\__init__.py", line 54, in load
return util.load_model(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\util.py", line 432, in load_model
return load_model_from_package(name, **kwargs) # type: ignore[arg-type]
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\util.py", line 468, in load_model_from_package
return cls.load(vocab=vocab, disable=disable, enable=enable, exclude=exclude, config=config) # type: ignore[attr-defined]
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\en_core_web_trf\__init__.py", line 10, in load
return load_model_from_init_py(__file__, **overrides)
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\util.py", line 649, in load_model_from_init_py
return load_model_from_path(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\util.py", line 506, in load_model_from_path
nlp = load_model_from_config(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\util.py", line 554, in load_model_from_config
nlp = lang_cls.from_config(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\language.py", line 1818, in from_config
nlp.add_pipe(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\language.py", line 801, in add_pipe
pipe_component = self.create_pipe(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy\language.py", line 680, in create_pipe
resolved = registry.resolve(cfg, validate=validate)
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\confection\__init__.py", line 728, in resolve
resolved, _ = cls._make(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\confection\__init__.py", line 777, in _make
filled, _, resolved = cls._fill(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\confection\__init__.py", line 832, in _fill
filled[key], validation[v_key], final[key] = cls._fill(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\confection\__init__.py", line 849, in _fill
getter_result = getter(*args, **kwargs)
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy_transformers\architectures.py", line 234, in create_TransformerModel_v3
model = TransformerModel(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy_transformers\layers\transformer_model.py", line 45, in __init__
wrapper = HFWrapper(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy_transformers\layers\hf_wrapper.py", line 53, in HFWrapper
HFShim(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\spacy_transformers\layers\hf_shim.py", line 41, in __init__
super().__init__(
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\thinc\shims\pytorch.py", line 47, in __init__
device = get_torch_default_device()
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\thinc\util.py", line 41, in get_torch_default_device
device_id = torch.cuda.current_device()
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\torch\cuda\__init__.py", line 552, in current_device
_lazy_init()
File "C:\Users\Normand Boivin\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\torch\cuda\__init__.py", line 221, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Reproduce steps
- Configure worddumb to "run spaCy with GPU"
- Create X-Ray
Screenshots or videos
No response