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

ValueError: string argument should contain only ASCII characters when decoding Adobe Adept DRM #2157

Open
mkende opened this issue Oct 13, 2022 · 6 comments

Comments

@mkende
Copy link

mkende commented Oct 13, 2022

Title

I have ADE installed on the same computer as Calibre with DeDRM 10.0.3. ADE is authorized with a computer key that was automatically imported into calibre (the key ID in the DeDRM settings is the same than the one (redacted) that appears in the log below).

However, when I import a book that was authorized by that ADE install. The DRM is not removed and the log contains a Python stacktrace.

My Environment

Calibre: 6.6.1 64 bit on Windows 10

Kindle: n/a

DeDRM: 10.0.3

Log

Log Title
Starting QuickView
DeDRM v10.0.3: Trying to decrypt foobar.epub
DeDRM v10.0.3: Verifying zip archive integrity
DeDRM v10.0.3: foobar.epub is a secure Adobe Adept ePub for UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "encodings\hex_codec.py", line 19, in hex_decode
ValueError: string argument should contain only ASCII characters

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 178, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1067, in run
  File "calibre_plugins.dedrm.__init__", line 533, in ePubDecrypt
ValueError: decoding with 'hex' codec failed (ValueError: string argument should contain only ASCII characters)
[11.27] splash screen hidden
[11.27] Started up in 11.27 seconds with 410 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'k\xbe{\xd9 q\xf7z\xbc\xd2\xe9\xa4\xd8\x8b\xc8\xe5\xa4\xa5\x9f\x8e\x9f5\xd5\xa9\x8fuq\xc7+Dn\x08', b'C:\\Users\\Mathias\\Documents\\My Digital Editions\\foobar.epub']
Added foobar to db in: 0.0
Added 1 books in 0.3 seconds
@ElleKayEm
Copy link

Delete the key that is saved in DeDRM. Add your book to calibre letting DeDRM retrieve the key automatically.

@jakhof
Copy link

jakhof commented Dec 25, 2022

Did you find a solution to the problem? I have the same problem... It doesn't help to delete and add directly to Calibre.

@ElleKayEm
Copy link

This is a known bug when you have saved an Adobe key manually. The solution I gave before has worked for others.

@mkende
Copy link
Author

mkende commented Dec 25, 2022

Your solution did work for me although, when I tried it, I tried it with another key (linked to an Adobe account because I had read somewhere that computer linked keys were not supported). I don't know which part solved the issue. But thanks for the tip.

Either way, it would still be great for future users if this issue could be fixed (or just to remove the option to manually add a key if this is not actually supported).

@jakhof
Copy link

jakhof commented Dec 25, 2022

How do I add the book directly to Calibre. It doesn't import .acsm files? It opens up in Adobe Digital Editions

@ElleKayEm
Copy link

@jakhof You just add the epub you download with ADE. There is another plugin called DeACSM which allows you to add the acsm file to calibre and download the epub and DeDRM works with that too.

@mkende I always thought it only worked with Adobe IDs until noDRM said otherwise in another issue here. Apparently this bug is fixed in the master code at noDRM's repo and will be in the 10.0.4 release.

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