noDRM / DeDRM_tools

DeDRM tools for ebooks
7.32k stars 323 forks source link

No DeDRM_plugin.zip file in DeDRM_tools-master.zip archive - error "No module named '__version'" #78

Open flaxton opened 2 years ago

flaxton commented 2 years ago

OK, I fixed the issue. I had to go to the Releases and download the 7.2.1 version here:

https://github.com/apprenticeharper/DeDRM_tools/releases

and that worked. I use GitHub myself, but am not an expert on it, obviously.

You have to click on "Releases" in the right sidebar to get this.


Here's my original post - trying to download the master branch source code:

OK, it's been a while since I tried DeDRM for Kindle. I saw this forked project that is being maintained, great!

I followed the instructions, downloaded DeDRM_tools-master.zip, unzipped it, went into the DeDRM_tools-master folder, and there is no DeDRM_plugin.zip in there.

No problem, I manually zipped everything (including version.py and other files starting with ) and tried installing that as a plugin in Calibre.

Here's the error it throws. And yes, I verified that version.py is in the zip archive I created. So is it looking for version instead of version.py? No, I copied version.py to __version, zipped it again and still get this error:

calibre, version 5.42.0 ERROR: Unhandled exception: ModuleNotFoundError:No module named '__version'

calibre 5.42 embedded-python: True is64bit: True macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '21.5.0', 'Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101') Python 3.8.5 OSX: ('10.16', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 48, 0) && Package KFX (from KFX Input) (1, 48, 0) && KFX metadata reader (from KFX Input) (1, 48, 0) && KFX Input (1, 48, 0) Traceback (most recent call last): File "calibre/gui2/preferences/plugins.py", line 326, in add_plugin File "calibre/customize/ui.py", line 476, in add_plugin File "calibre/customize/ui.py", line 64, in load_plugin File "calibre/customize/zipplugin.py", line 292, in load File "importlib/init.py", line 127, in import_module File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 191, in exec_module File "calibre_plugins.dedrm.init", line 98, in import version ModuleNotFoundError: No module named 'version'

This is on a 2020 M1 MacBook Pro, macOS 12.4 Monterey, python 3.9.7.

Any ideas?

I'm a fairly inexperienced Python user, although I have written some Python programs (that worked lol).

Thanks!

Fred

ElleKayEm commented 2 years ago

Download DeDRM_tools_10.0.2.zip from https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.2. Unzip it and load DeDRM_plugin.zip.

keithstellyes commented 9 months ago

I ran into this exact issue with this same version, attempting to load DeDRM_plugin.zip and still had it. As a workaround, see my comment: https://github.com/noDRM/DeDRM_tools/issues/329#issuecomment-1912842807

Doing what @ElleKayEm suggested did not work. However, given that this version is ancient, I half-wonder if it's just the fact it's such an old version.