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 tell if this is an installation bug, or an issue with the program itself #101

Closed arrteedeetwo closed 1 year ago

arrteedeetwo commented 1 year ago

calibre, version 6.11.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 and X-Ray for 黒魔女さんが通る!! チョコ、デビューするの巻 (講談社青い鳥文庫) Job: "Generating Word Wise and X-Ray for 黒魔女さんが通る!! チョコ、デビューするの巻 (講談社青い鳥文庫)" 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 119, in do_job File "calibre_plugins.worddumb.deps", line 54, in install_deps File "calibre_plugins.worddumb.deps", line 167, in pip_install File "calibre_plugins.worddumb.utils", line 50, in run_subprocess File "subprocess.py", line 524, in run subprocess.CalledProcessError: Command '['calibre-debug', '-e', 'c:/users/rchlt/appdata/local/programs/python/python310/lib/site-packages/pip/pip-runner.py', '--', '--disable-pip-version-check', 'install', '-U', '-t', 'C:\Users\rchlt\AppData\Roaming\calibre\plugins\worddumb-libs-py3.10', '--no-user', 'https://github.com/explosion/spacy-models/releases/download/ja_core_news_md-3.4.0/ja_core_news_md-3.4.0-py3-none-any.whl']' returned non-zero exit status 1.

Called with args: ((67, 'EPUB', 'B:\Calibre\Shi Qi Yang Si\Hei Mo Nu sangaTong ru!! tiyoko, deb (67)\Hei Mo Nu sangaTong ru!! tiyoko - Shi Qi Yang Si.epub', <calibre.ebooks.metadata.book.base.Metadata object at 0x000002414C56A050>, {'spacy': 'ja_corenews', 'wiki': 'ja', 'kaikki': 'Japanese', 'gloss': False, 'has_trf': True}), True, True) {'notifications': <queue.Queue object at 0x000002414C5699F0>, 'abort': <threading.Event object at 0x000002414C569FF0>, 'log': <calibre.utils.logging.GUILog object at 0x000002414C56A380>} Failed to initialize plugin: 'C:\Users\rchlt\AppData\Roaming\calibre\plugins\DeDRM.zip' Traceback (most recent call last): File "calibre\customize\ui.py", line 743, in initialize_plugins File "calibre\customize\ui.py", line 64, in load_plugin File "calibre\customize\zipplugin.py", line 307, in load File "importlib__init__.py", line 126, in import_module File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "calibre\customize\zipplugin.py", line 199, in exec_module File "calibre\customize\zipplugin.py", line 195, in get_code File "calibre_plugins.dedrm.init", line 168 print u"{0} v{1}: Copying needed library files from plugin's zip".format(PLUGIN_NAME, PLUGIN_VERSION) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 2 ╰─> [23 lines of output] Usage: calibre-debug.exe [options]

  Various command line interfaces useful for debugging calibre. With no options,
  this command starts an embedded Python interpreter. You can also run the main
  calibre GUI, the calibre E-book viewer and the calibre editor in debug mode.

  It also contains interfaces to various bits of calibre that do not have
  dedicated command line tools, such as font subsetting, the E-book diff tool and so
  on.

  You can also use calibre-debug.exe to run standalone scripts. To do that use it like this:

      calibre-debug.exe -e myscript.py -- --option1 --option2 file1 file2 ...

  Everything after the -- is passed to the script. You can also use calibre-debug
  as a shebang in scripts, like this:

      #!/usr/bin/env -S calibre-debug -e -- --

  Whenever you pass arguments to calibre-debug.exe that have spaces in them, enclose the arguments in quotation marks. For example: "C:\some path with spaces"

  calibre-debug.exe: error: no such option: --egg-base
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

xxyzz commented 1 year ago

The first error is caused by outdated Python 2 verison of DeDRM plugin, please uninstall it. The latest DeDRM plugin can be downloaded from here: https://github.com/noDRM/DeDRM_tools

You can also install the test version of WordDumb from GitHub Actions Artifacts: https://github.com/xxyzz/WordDumb/actions/workflows/tests.yml which supports Word Wise for non-English Kindle books and improve the loading speed of customize Word Wise dialog.

xxyzz commented 1 year ago

The second error is more tricky, I use calibre's Python interpreter for pip but calibre-debug doesn't pass the pip arguments. I'll see if it's possible to fix this in calibre's code.

xxyzz commented 1 year ago

This error should be fixed on master branch, please download the test plugin from GitHub Actions: https://github.com/xxyzz/WordDumb/actions/runs/4050955255

arrteedeetwo commented 1 year ago

Took me a while to get back to this project, but it does appear to be working on the Japanese book now. Thanks!

xxyzz commented 1 year ago

The link I posted before is not the latest test version, I have made more changes to the code recently. You can find the latest zip file at here(the first successful workflow): https://github.com/xxyzz/WordDumb/actions/workflows/tests.yml