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

Windows permission error when running X-Ray #95

Closed
2 tasks done
victorscarpes opened this issue Dec 11, 2022 · 3 comments
Closed
2 tasks done

Windows permission error when running X-Ray #95

victorscarpes opened this issue Dec 11, 2022 · 3 comments

Comments

@victorscarpes
Copy link

Checkboxes

  • I have read the README file.
  • I have not found similar issue or disscussion at GitHub.

Describe the bug

I've recently reinstalled calibre on a brand new laptop and whenever I try to generate X-Ray for any book, it does not work properly.

System Information

OS: Windows 11 Pro Version 22H2 build 22621.900
calibre version: 6.9.0, 64bit
Python version: 3.11.0, 64bit
Plugin version: 3.28.0

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 Word Wise e X-Ray for What If? 2: Additional Serious Scientific Answers to Absurd Hypothetical Questions 
Job: "Generating Word Wise e X-Ray for What If? 2: Additional Serious Scientific Answers to Absurd Hypothetical Questions" 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 158, 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/vcarpes/AppData/Local/Programs/Python/Python311/Lib/site-packages/pip/__pip-runner__.py', '--', '--disable-pip-version-check', 'install', '-U', '-t', 'C:\\Users\\vcarpes\\AppData\\Roaming\\calibre\\plugins\\worddumb-libs-py3.10', '--no-user', 'https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.4.1/en_core_web_lg-3.4.1-py3-none-any.whl']' returned non-zero exit status 2.
 
Called with args: ((323, 'AZW3', 'C:\\Users\\vcarpes\\OneDrive\\Calibre\\Randall Munroe\\What If_ 2_ Additional Serious Scie (323)\\What If_ 2_ Additional Serious - Randall Munroe.azw3', <calibre.ebooks.metadata.book.base.Metadata object at 0x000001D786BE4DF0>, {'spacy': 'en_core_web_', 'wiki': 'en', 'kaikki': 'English', 'gloss': True, 'has_trf': True}), True, True) {'notifications': <queue.Queue object at 0x000001D786BE7310>, 'abort': <threading.Event object at 0x000001D786BE7A90>, 'log': <calibre.utils.logging.GUILog object at 0x000001D786BE7BE0>} 
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\vcarpes\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\base_command.py", line 160, in exc_logging_wrapper
  File "C:\Users\vcarpes\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
  File "C:\Users\vcarpes\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\commands\install.py", line 553, in run
  File "C:\Users\vcarpes\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\commands\install.py", line 608, in _handle_target_dir
  File "shutil.py", line 739, in rmtree
  File "shutil.py", line 617, in _rmtree_unsafe
  File "shutil.py", line 615, in _rmtree_unsafe
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\vcarpes\\AppData\\Roaming\\calibre\\plugins\\worddumb-libs-py3.10\\blis\\cy.cp310-win_amd64.pyd'

Reproduce steps

  1. Click the icon to generate X-Ray
  2. Look at the error
  3. Get confused
  4. Go to github to ask for help

Screenshots or videos

No response

@xxyzz
Copy link
Owner

xxyzz commented Dec 11, 2022

I saw this line in the calibre change log last month and though maybe this "Smart" App Control thing could screw the X-Ray feature again like macOS's Library Validation.

I don't use Windows and can't even run Windows 11 in virtual machine so I can't test it. But maybe your laptop supports CUDA and you can enable the "run spaCy with GPU" feature, if that works it means the same trick I used to bypass macOS's Library Validation also works on Windows.

I forget to ask, is "Smart App Control" enabled on your laptop? If it's enabled and you can't install CUDA, you can disable it and see if the error could be solved.

Keep in mind that re-enabled "Smart App Control" requires reset Windows.

@miiPoP
Copy link
Contributor

miiPoP commented Dec 11, 2022

On a side note

I don't use Windows and can't even run Windows 11 in virtual machine

https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ worked for me on https://www.virtualbox.org/. (Even if my hardware does not meet the TPM, GPT requirements).

But then again, my guest OS is Windows 10.

@xxyzz
Copy link
Owner

xxyzz commented Dec 12, 2022

Thanks, I almost forget virtualbox. I don't know what causes the PermissionError error but I'm pretty sure "Smart App Control" has nothing to do with this because it causes a different error.

Could you delete the "worddumb-libs-py3.10" directory then retry?

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

3 participants