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

File Path Issue on Windows, Possibly Due to Space in Username #92

Closed joshuacant closed 1 year ago

joshuacant commented 1 year ago

Checkboxes

Describe the bug

"Create Word Wise" seems to work fine, however "Create X-Ray" immediately errors out.

System Information

Win11 22H2

Error message

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

Starting job: Generating X-Ray for Home Fires 
Job: "Generating X-Ray for Home Fires" 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 111, in do_job
  File "calibre_plugins.worddumb.deps", line 47, in install_deps
  File "calibre_plugins.worddumb.deps", line 134, in pip_install
  File "calibre_plugins.worddumb.utils", line 47, in run_subprocess
  File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['calibre-debug', '-e', 'C:/Users/Joshua/__pip-runner__.py', '--', '--disable-pip-version-check', 'install', '-U', '-t', WindowsPath('C:/Users/Joshua Cantara/AppData/Roaming/calibre/plugins/worddumb-libs-py3.10'), '--no-user', 'rapidfuzz==2.13.2']' returned non-zero exit status 1.

Called with args: ((9, 'KFX', 'C:\\Users\\Joshua Cantara\\Documents\\Calibre\\Gene Wolfe\\Home Fires (9)\\Home Fires - Gene Wolfe.kfx', <calibre.ebooks.metadata.book.base.Metadata object at 0x000001DB954CAA40>, {'spacy': 'en_core_web_', 'wiki': 'en', 'kaikki': 'English', 'gloss': True, 'has_trf': True}), False, True) {'notifications': <queue.Queue object at 0x000001DB954CB430>, 'abort': <threading.Event object at 0x000001DB954CA320>, 'log': <calibre.utils.logging.GUILog object at 0x000001DB954CB220>} 
Traceback (most recent call last):
  File "runpy.py", line 196, in _run_module_as_main
  File "runpy.py", line 86, in _run_code
  File "site.py", line 83, in <module>
  File "site.py", line 78, in main
  File "site.py", line 50, in run_entry_point
  File "calibre\debug.py", line 275, in main
  File "calibre\debug.py", line 208, in run_script
  File "polyglot\builtins.py", line 107, in exec_path
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Joshua\\__pip-runner__.py'

Reproduce steps

Open Calibre, Pick a Book, Create X-Ray

Screenshots or videos

I'm not a software scientist, but it sure looks to me like somehow the space in my username, and thus, the first space in the file path, is causing the pip-runner command to be truncated.

xxyzz commented 1 year ago

Hi, this error was reported in https://github.com/xxyzz/WordDumb/issues/90. And was resolved in the master branch, you can download the latest test plugin from GitHub Actions Artifacts at here.

There is a bug about the "run spaCy with GPU" option still not resolved, once it's fixed a new version would be released.

joshuacant commented 1 year ago

Sincere apologies for the duplicate report, I did search closed issues but failed to land on that one. Entirely my fault for not looking harder before taking up your valuable time. Thanks for the plugin.

xxyzz commented 1 year ago

Hi @joshuacant, a new version with a bunch of bug fixes has been released, you can update the plugin in calibre now.