xxyzz / WordDumb

A calibre plugin that generates Kindle Word Wise and X-Ray files for KFX, AZW3, MOBI and EPUB eBook.
https://xxyzz.github.io/WordDumb/
GNU General Public License v3.0
386 stars 19 forks source link

Can't generate X-ray #104

Closed booniversity closed 1 year ago

booniversity commented 1 year ago

Checkboxes

Describe the bug

I tried to generate X-ray but keep running into this error. I'm not great with technologies so I'm sorry if I made any mistakes!

System Information

OS: MacOS Monterey 12.2.1 Calibre Version: 6.12.0 WordDumb version: 3.28.2 Python Version: 3.8.9

Error message

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

Starting job: Generating X-Ray for Harry Potter and the Chamber of Secrets 
Job: "Generating X-Ray for Harry Potter and the Chamber of Secrets" 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 167, in do_job
    run_subprocess(args, input_str)
  File "calibre_plugins.worddumb.utils", line 59, in run_subprocess
    return subprocess.run(
  File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/Users/kkboo/Library/Preferences/calibre/plugins/WordDumb.zip', 'B019PIOJY0', '/Users/kkboo/Calibre Library/J.K. Rowling/Harry Potter and the Chamber of Secrets (26)/Harry Potter and the Chamber of Secrets - J.K. Rowling.azw3', 'Harry_Potter_and_the_Chamber_of', 'e4090f4a', 'en_core_web_md', 'en', 'en', 'utf-8', 'WordDumb/3.28.2 (https://github.com/xxyzz/WordDumb)', 'hk', 'https://harrypotter.fandom.com/en', 'AZW3', '1', '/Users/kkboo/Library/Preferences/calibre/plugins/WordDumb.zip', '', '-x', '-s', '-m']' returned non-zero exit status 1.

Called with args: ((26, 'AZW3', '/Users/kkboo/Calibre Library/J.K. Rowling/Harry Potter and the Chamber of Secrets (26)/Harry Potter and the Chamber of Secrets - J.K. Rowling.azw3', <calibre.ebooks.metadata.book.base.Metadata object at 0x15da5c760>, {'spacy': 'en_core_web_', 'wiki': 'en', 'kaikki': 'English', 'gloss': True, 'has_trf': True}), False, True) {'notifications': <queue.Queue object at 0x15da5c550>, 'abort': <threading.Event object at 0x15da70940>, 'log': <calibre.utils.logging.GUILog object at 0x15da707c0>} 
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/kkboo/Library/Preferences/calibre/plugins/WordDumb.zip/__main__.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/Users/kkboo/Library/Preferences/calibre/plugins/WordDumb.zip/dump_kindle_lemmas.py", line 13, in <module>
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Reproduce steps

  1. Create X-Ray
  2. Get the error

Screenshots or videos

No response

xxyzz commented 1 year ago

Hi, please install Python 3.10 or above from Homebrew.