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

Word dumb generation error in Macbook Pro M1 #46

Open
sleebapaul opened this issue Jul 22, 2022 · 1 comment
Open

Word dumb generation error in Macbook Pro M1 #46

sleebapaul opened this issue Jul 22, 2022 · 1 comment

Comments

@sleebapaul
Copy link

sleebapaul commented Jul 22, 2022

Describe the bug

On trying to generate the word wise, the following error occurs.

System Information

OS: MacOS Monterey 12.4
Calibre Version: 6.1.0
WordDumb version: 3.23.1
Python Version: 3.9.13

Error message

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

Starting job: Generating Word Wise and X-Ray for Leonardo da Vinci 
Job: "Generating Word Wise and X-Ray for Leonardo da Vinci" 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 147, in do_job
    run_subprocess(args, input_str)
  File "calibre_plugins.worddumb.utils", line 48, in run_subprocess
    return subprocess.run(
  File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/Users/****/Library/Preferences/calibre/plugins/WordDumb.zip', '', PosixPath('/Users/***/Calibre Library/Walter Isaacson/Leonardo da Vinci (3)/Leonardo da Vinci - Walter Isaacson.epub'), '', '', 'en_core_web_lg', 'en', '', '3.23.1', 'cn', '', 'EPUB', '1', '/Users/***/Library/Preferences/calibre/plugins/WordDumb.zip', '', '-l', '-x', '-s', '-m']' returned non-zero exit status 1.
 
Called with args: ((3, 'EPUB', '/Users/***/Calibre Library/Walter Isaacson/Leonardo da Vinci (3)/Leonardo da Vinci - Walter Isaacson.epub', <calibre.ebooks.metadata.book.base.Metadata object at 0x117faa620>, {'spacy': 'en_core_web_', 'wiki': 'en', 'kaikki': 'English'}), True, True) {'notifications': <queue.Queue object at 0x117faa560>, 'abort': <threading.Event object at 0x1181c3670>, 'log': <calibre.utils.logging.GUILog object at 0x1181c00d0>} 
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/***/Library/Preferences/calibre/plugins/WordDumb.zip/__main__.py", line 55, in <module>
  File "/Users/***/Library/Preferences/calibre/plugins/WordDumb.zip/parse_job.py", line 246, in create_files
  File "/Users/***/Library/Preferences/calibre/plugins/WordDumb.zip/parse_job.py", line 570, in load_spacy
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/spacy/__init__.py", line 6, in <module>
    from .errors import setup_default_warnings
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/spacy/errors.py", line 2, in <module>
    from .compat import Literal
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/spacy/compat.py", line 3, in <module>
    from thinc.util import copy_array
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/thinc/__init__.py", line 5, in <module>
    from .config import registry
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/thinc/config.py", line 14, in <module>
    import srsly
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/srsly/__init__.py", line 1, in <module>
    from ._json_api import read_json, read_gzip_json, write_json, write_gzip_json
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/srsly/_json_api.py", line 6, in <module>
    from . import ujson
  File "/Users/***/Library/Preferences/calibre/plugins/worddumb-libs-py3.8/srsly/ujson/__init__.py", line 1, in <module>
    from .ujson import decode, encode, dump, dumps, load, loads  # noqa: F401
ModuleNotFoundError: No module named 'srsly.ujson.ujson'

Reproduce steps

  1. Select a notebook
  2. Click on Plugin
  3. Click on Calibre jobs

Screenshots or videos

Screenshot 2022-07-22 at 6 45 31 PM

@xxyzz
Copy link
Owner

xxyzz commented Jul 22, 2022

Some users posted similar errors before but I still don't know what causes the error. Please delete the srsly* folder in the worddumb-libs-py3.8 folder, the plugin will reinstall that package in the next job.

Even though the Python version you posted is 3.9, the plugin uses the command line tool Python(/usr/bin/python3) which is 3.8. You could install Python via Homebrew so the plugin can find it.

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