|
|
#16 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,229
Karma: 84699364
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Out of curiosity, when you did the original uninstall of calibre did you make use of any third party clean-up tools?
|
|
|
|
|
|
#17 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
OK - so I got everything back!!
NOW to address the original issue and problem - that led me to uninstall and reinstall in the first place - leading to that nightmare. The 126 ERROR First - note: running calibre as adminstrator does not affect the problem. Running in safe mode does not resolve the problem. And I learned - the hardest way - that the problem is not coming from a plugin etc - because when I lost every setting - and the reinstall gave me just the base calibre install - THE PROBLEM STILL occurred. I don't know what could have cause this error to start - because it was not happening until sometime this morning And I don't know of any changes I made that could cause this - changes to the calibre installation and or the settings - clearly is not the cause. And I did not change anything significant on the computer outside of calibre - either installing new programs or changing windows settings. So I am completely clueless as to the cause and origin. BUT I JUST DISCOVERED SOMETHING SIGNIFICANT The issue was happening when I would click the VIEW icon to OPEN a book. And it happened on all the books I tried. But now I discovered the issue is clearly the CALIBRE READER. If I click to open any other format (i.e. PDF, Word, DJVU, etc) than an ebook (EPUB, MOBI, AZW3, etc) the book opens as usual. No error. IT IS ONLY giving me this error when it attempts to ooen the Calibre Reader - thus whenever it attempts to open an epub, etc. |
|
|
|
|
|
#18 | |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,952
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Are they unchecked or unchecked in the Preferences→Behaviour→Use viewer for: setting. BR |
|
|
|
|
|
|
#19 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
I have been spending hours trying to figure this out.
The evidence points to a failure inside the Calibre viewer startup, not to a missing DLL: ebook-viewer.exe launches. Windows creates a prefetch entry. QtWebEngineProcess runs. All the major DLLs are present. Reinstalling doesn't change the behavior. |
|
|
|
|
|
#20 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
The exact viewer error:
Plain Text Local library failed with error 126. The specified module cannot be found. The calibre-debug startup error: Plain Text Failed to import encodings module ValueError: bad marshal data (unknown type code) The fact that: BAT QtWebEngineProcess.exe runs normally, but: BAT ebook-viewer.exe "C:\Temp\Test.epub" immediately produces the error. |
|
|
|
|
|
#21 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,633
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Error code 126 means Windows could not load calibre-launcher.dll or one of the DLLs it depends on. Windows does not say which one. Every calibre program (calibre.exe, ebook-viewer.exe, ebook-edit.exe, etc.) loads that same calibre-launcher.dll from the same folder. Since calibre itself starts for you and only the viewer fails, the DLL is not actually missing. Something on your machine is stopping ebook-viewer.exe in particular from loading its DLLs. That also explains why uninstalling and reinstalling (and deleting your settings) changed nothing.
Earlier reports had three causes: 1. A mix of old and new installs after an upgrade (2017, calibre 3.0/3.2; https://bugs.launchpad.net/calibre/+bug/1701457 and https://www.mobileread.com/forums/sh....php?p=3538600). Uninstalling, deleting C:\Program Files\Calibre2 and reinstalling fixed it. You have already done this, so it is not your problem. 2. Windows "N" editions without the Media Pack (2022, https://www.mobileread.com/forums/sh...d.php?t=348470). This matched your case exactly: calibre worked, PDFs opened, but EPUBs did nothing in the viewer, and reinstalling did not help. The viewer uses Qt WebEngine, which needs Windows media DLLs such as C:\Windows\System32\MFTranscode.dll. Those DLLs are missing on N editions unless the Media Pack is installed. Installing the Media Pack fixed it. Run winver and check whether your edition name ends in "N". Also check whether C:\Windows\System32\MFTranscode.dll exists. A Windows update or a "debloat"/cleanup tool can also remove the media components. 3. Antivirus or other security software blocking or quarantining only the viewer (for example https://bugs.launchpad.net/calibre/+bug/1244837, where Avast blocked only ebook-viewer.exe). I think this is the most likely cause for you. You also got "PermissionError: Permission denied" while calibre was reading its own shortcuts\main.json file. That means something on your system is interfering with calibre's file access, not just its DLLs. Things to check: - Your antivirus quarantine or history, for anything in the Calibre2 folder. - Windows Security > Virus & threat protection > Protection history. - Windows Security > App & browser control > Exploit protection > Program settings, for an entry for ebook-viewer.exe. If there is one, remove it. - Ransomware protection or Controlled folder access. Add C:\Program Files\Calibre2 and your C:\Users\<you>\AppData\Roaming\calibre folder as exclusions. Then run the calibre installer again and choose Repair. To narrow it down, please run these in a Command Prompt and post the output: "C:\Program Files\Calibre2\ebook-viewer.exe" "C:\Program Files\Calibre2\calibre-debug.exe" -w "C:\Program Files\Calibre2\calibre-debug.exe" -c "from qt.webengine import QWebEnginePage; print(QWebEnginePage)" The first one shows whether the 126 error happens when the viewer starts on its own. The second starts the viewer through a different exe, so if it opens, something is blocking ebook-viewer.exe specifically. If the third fails with "DLL load failed", the problem is a missing Windows component (see point 2). In that case, a tool like Dependencies (https://github.com/lucasg/Dependencies) run on C:\Program Files\Calibre2\app\bin\Qt6WebEngineCore.dll will show which DLL is missing. That is how the Media Pack problem was tracked down last time. About your settings: uninstalling calibre never touches C:\Users\<you>\AppData\Roaming\calibre or your libraries. The settings loss came from the restore point and deletions, not the uninstaller. Before experimenting any further, make a copy of that folder (and the gui.json you have now). |
|
|
|
|
|
#22 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
I get the 126 error just trying to run the calibre ebook viewer.
But not this. I have the Open With plugin installed. And programmed to open epubs when I use the plugin. But it gives an error - even though the program runs on its own and opens that same book directly from explorer. Calibre Viewer Plain Text ebook-viewer.exe "C:\Temp\Test.epub" → Error 126 Aquile Reader directly Double-click EPUB in Explorer: ✅ Opens fine Aquile Reader through Open With plugin Open With → Aquile → Plain Text OSError: [WinError 87] The parameter is incorrect |
|
|
|
|
|
#23 | |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
Here is what I get
Quote:
C:\Program Files\Calibre2\app\bin>"C:\Program Files\Calibre2\calibre-debug.exe" -w Failed to initialize plugin: 'C:\\Users\\cgrap\\AppData\\Roaming\\calibre\\plug ins\\DeDRM.zip' Traceback (most recent call last): File "calibre\customize\ui.py", line 927, in initialize_plugins File "calibre\customize\ui.py", line 104, in load_plugin File "calibre\customize\zipplugin.py", line 336, in load File "zipfile\__init__.py", line 1505, in __init__ File "zipfile\__init__.py", line 1572, in _RealGetContents zipfile.BadZipFile: File is not a zip file DEBUG: 0.0 GetFileName::__init__.py - loading translations Failed to initialize plugin: 'C:\\Users\\cgrap\\AppData\\Roaming\\calibre\\plug ins\\Job Spy.zip' Traceback (most recent call last): File "calibre\customize\ui.py", line 927, in initialize_plugins File "calibre\customize\ui.py", line 104, in load_plugin File "calibre\customize\zipplugin.py", line 336, in load File "zipfile\__init__.py", line 1505, in __init__ File "zipfile\__init__.py", line 1572, in _RealGetContents zipfile.BadZipFile: File is not a zip file Failed to initialize plugin: 'C:\\Users\\cgrap\\AppData\\Roaming\\calibre\\plug ins\\Library Codes - SRU.zip' Traceback (most recent call last): File "calibre\customize\ui.py", line 927, in initialize_plugins File "calibre\customize\ui.py", line 104, in load_plugin File "calibre\customize\zipplugin.py", line 336, in load File "zipfile\__init__.py", line 1505, in __init__ File "zipfile\__init__.py", line 1572, in _RealGetContents zipfile.BadZipFile: File is not a zip file Failed to initialize plugin: 'C:\\Users\\cgrap\\AppData\\Roaming\\calibre\\plug ins\\Mass Search-Replace.zip' Traceback (most recent call last): File "calibre\customize\ui.py", line 927, in initialize_plugins File "calibre\customize\ui.py", line 104, in load_plugin File "calibre\customize\zipplugin.py", line 336, in load File "zipfile\__init__.py", line 1505, in __init__ File "zipfile\__init__.py", line 1572, in _RealGetContents zipfile.BadZipFile: File is not a zip file Failed to initialize plugin: 'C:\\Users\\cgrap\\AppData\\Roaming\\calibre\\plug ins\\MultiColumnSearch.zip' Traceback (most recent call last): File "calibre\customize\ui.py", line 927, in initialize_plugins File "calibre\customize\ui.py", line 104, in load_plugin File "calibre\customize\zipplugin.py", line 336, in load File "zipfile\__init__.py", line 1505, in __init__ File "zipfile\__init__.py", line 1572, in _RealGetContents zipfile.BadZipFile: File is not a zip file calibre_plugins.SRU.__init__:110: SyntaxWarning: "\w" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\w"? A raw string is also an option. calibre_plugins.SRU.__init__:500: SyntaxWarning: "\d" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\d"? A raw string is also an option. calibre_plugins.SRU.__init__:590: SyntaxWarning: "\d" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\d"? A raw string is also an option. calibre_plugins.SRU.__init__:627: SyntaxWarning: "\d" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\d"? A raw string is also an option. QPA platform: windows devicePixelRatio: 1.25 logicalDpi: 96.0 x 96.0 physicalDpi: 113.41395348837209 x 113.12164948453608 ApplicationPaletteChange event ignored Using calibre Qt style: True Sandboxing disabled by user. [33820:43716:1125/015057.580:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5) [33820:42992:1125/015057.581:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5) [33820:39640:1125/015057.582:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5) [33820:34880:1125/015057.604:ERROR:disk_cache.cc(216)] Unable to create cache [33820:34880:1125/015057.604:ERROR:gpu_disk_cache.cc(711)] Gpu Cache Creation failed: -2 [33820:34880:1125/015057.604:ERROR:disk_cache.cc(216)] Unable to create cache [33820:34880:1125/015057.604:ERROR:gpu_disk_cache.cc(711)] Gpu Cache Creation failed: -2 [33820:34880:1125/015057.605:ERROR:disk_cache.cc(216)] Unable to create cache [33820:34880:1125/015057.605:ERROR:gpu_disk_cache.cc(711)] Gpu Cache Creation failed: -2 [33820:42140:1125/015057.610:ERROR:gpu_channel_manager.cc(966)] Failed to create GLES3 context, fallback to GLES2. [33820:42140:1125/015057.611:ERROR:gpu_channel_manager.cc(977)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. [33820:42140:1125/015057.611:ERROR:gpu_channel_manager.cc(966)] Failed to create GLES3 context, fallback to GLES2. [33820:42140:1125/015057.612:ERROR:gpu_channel_manager.cc(977)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. [3.544] bridge ready* And gives the 126 Error* |
|
|
|
|
|
|
#24 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
The most important finding isn't the cache folder itself.
It's this: Plain Text "C:\Program Files\Calibre2\calibre-debug.exe" -w does not die immediately. Instead it reaches: Plain Text [3.544] bridge ready and remains running. While also logging: Plain Text Unable to move the cache: Access is denied. (0x5) Unable to create cache Gpu Cache Creation failed: -2 At the same time: BAT tasklist | findstr /i qtweb shows many QtWebEngineProcess.exe instances still running. That's much more specific than "viewer gives error 126". |
|
|
|
|
|
#25 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
1) ebook-viewer.exe gives Error 126.
2) calibre-debug.exe -w does NOT immediately fail. It reaches: [3.544] bridge ready and logs: Unable to move the cache: Access is denied. (0x5) Unable to create cache Gpu Cache Creation failed: -2 3) %LOCALAPPDATA%\calibre-cache\qwe exists and is actively populated. 4) I own the directory and have FullControl. 5) I can create new files/folders under calibre-cache. 6) After terminating all calibre and QtWebEngine processes, Windows still refuses to rename: calibre-cache\qwe calibre-cache\qwe\viewer-lookup calibre-cache\qwe\viewer-lookup\sp calibre-cache\qwe\viewer-lookup\sp\GPUCache with: Access is denied. |
|
|
|
|
|
#26 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
BUT ... after running all these tests trying to figure out what is going on.
After I spent a couple hours getting my configuration back - the column order, the toolbars, plugins that were missing, setting such as default font size. Column icons For some reason I am now BACK at a base install setup. No second toolbar. No menubar items. Only the base install on main toolbar. Back to its default order. No column readoring. Etc |
|
|
|
|
|
#27 |
|
Connoisseur
![]() Posts: 80
Karma: 22
Join Date: Dec 2016
Device: Kindle
|
BUT - and I hope this preserved all those changes.
I installed Calibre Config Reports. I told it to create a backup config. But it did not ask where to save it. Nor did it say where it did save it. And I am not familiar with the plugin - but I looked all over to find settings that would set that. So did that save the config - and if so - where and how do I get it back |
|
|
|
|
|
#28 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,952
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Try C:\Users\<user>\AppData\Roaming\Calibre\CCR Backups
Or look here It's a fixed location within the dataset being backed up BR Last edited by BetterRed; Today at 03:50 AM. |
|
|
|
|
|
#29 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,633
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Thanks for running those. They narrow it down a lot.
calibre-debug.exe -w got to "bridge ready". That means the viewer code, Qt WebEngine and all the DLLs load and run fine on your machine. ebook-viewer.exe and calibre-debug.exe are tiny stub programs. All either one does is load calibre-launcher.dll from app\bin and hand over to it. So if one stub can load that DLL and the other gets error 126 at the same step, from the same folder, nothing is missing from the install. Something on your system is treating the file ebook-viewer.exe differently. Point 2 from my earlier post (Windows N / Media Pack) is ruled out, so ignore it. Reinstalling won't fix a setting that Windows attaches to a program's file name, because it survives uninstalls. The likely candidates are: 1. Exploit protection. Go to Windows Security > App & browser control > Exploit protection settings > Program settings. If ebook-viewer.exe is in the list, select it and click Remove. Settings such as "Validate image dependency integrity" or "Code integrity guard" will stop a program from loading its DLLs. 2. Image File Execution Options. Run regedit and look for this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ebook-viewer.exe If it exists, export it as a backup and then delete it. Exploit protection and some "hardening", "debloat" and security tools store per-program settings here. 3. Your antivirus or security software, if it has a per-program rule or "hardened mode" for ebook-viewer.exe. Look in its settings and quarantine history. The "Unable to move the cache: Access is denied" messages are harmless on their own. The viewer works without that cache. But you could not rename those folders even after killing every calibre process. Together with the earlier PermissionError on shortcuts\main.json, that tells me something is filtering access to calibre's files. Usual suspects are antivirus, Controlled folder access (ransomware protection), or a cloud sync tool like OneDrive working on AppData. To clear the cache, close calibre, reboot, and delete %LOCALAPPDATA%\calibre-cache\qwe. calibre will recreate it. You also said you still got the 126 error after "bridge ready". Did a viewer window actually open with calibre-debug -w? Please close calibre completely and run: "C:\Program Files\Calibre2\calibre-debug.exe" -w "C:\Temp\Test.epub" If the book opens, you can use that as a workaround until we find what is blocking ebook-viewer.exe. If a 126 dialog still appears, take a screenshot of it, including its title bar. Your settings and data recovery: please be careful here, because I think the recovery tool is causing some of what you're seeing. - Files recovered with undelete/data recovery tools are often silently corrupt. You saw this yourself: the 112 KB gui.json was "gibberish". Your plugins DeDRM.zip, Job Spy.zip, Library Codes - SRU.zip, Mass Search-Replace.zip and MultiColumnSearch.zip now fail with "File is not a zip file", so those recovered copies are junk too. Delete them from AppData\Roaming\calibre\plugins and reinstall them from Preferences > Plugins > Get new plugins (DeDRM from its own site). - Earlier you got "bad marshal data" from calibre-debug. That points to corrupt files in the program folder, and you said you also recovered the Calibre2 program folder. Never restore the program folder from recovery. Uninstall, delete C:\Program Files\Calibre2 completely, and install fresh from https://calibre-ebook.com/download. Do this after you've done 1 and 2 above. - This is why your layout keeps "resetting". If calibre cannot parse a settings file such as gui.json, it uses defaults, and the next time it saves, it writes a fresh file with those defaults. A corrupt recovered gui.json (or one calibre couldn't read because of the access problem) will make your toolbars, columns and so on revert, and the file gets rewritten small. Once you have a setup that works, close calibre and copy the whole C:\Users\cgrap\AppData\Roaming\calibre folder somewhere safe. Do that before every experiment. The Calibre Config Reports backup BetterRed pointed to is useful as well, but a plain copy of that folder is the full backup. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Failed feed: Tips_<urlopen error [Errno 11004] getaddrinfo failed> | Danesh | Recipes | 4 | 03-19-2015 04:45 AM |
| failed to load icu | fem | Development | 5 | 04-03-2014 05:55 AM |
| calibre failed to load after 1.12.0 down load | junglered | Recipes | 2 | 11-27-2013 11:15 PM |
| RuntimeError: Failed to load ImageMagick | chris1412 | Calibre | 2 | 07-14-2012 05:58 AM |
| Failed to load ImageMagick | trustno12003 | Calibre | 2 | 06-17-2009 01:25 AM |