noDRM / DeDRM_tools

DeDRM tools for ebooks
7.05k stars 316 forks source link

Error on low calibre version #235

Open WasiGG opened 1 year ago

WasiGG commented 1 year ago

Question / bug report

Hi, I tried use this plugin on low calibre version (4.23.0), but encountered the below issue. It might be string encode/decode issue of Python version. I had changed my environment variable to use Python 3, but it's still the same. It seems that the plugin had built-in python interpreter. Could you please help fix the issue? Thanks a lot.

calibre, version 4.23.0 錯誤: 未處理的例外: TypeError:ExpandEnvironmentStrings() argument 1 must be unicode, not str

calibre 4.23 [64bit] embedded-python: True is64bit: True Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE') ('Windows', '7', '6.1.7601') Python 2.7.16+ Windows: ('7', '6.1.7601', 'SP1', u'Multiprocessor Free') Interface language: zh_TW Successfully initialized third party plugins: DeDRM (10, 0, 3) && Obok DeDRM (10, 0, 3) Traceback (most recent call last): File "calibre_plugins.obok_dedrm.action", line 97, in launchObok File "calibre_plugins.obok_dedrm.obok.obok", line 315, in init TypeError: ExpandEnvironmentStrings() argument 1 must be unicode, not str

Which version of Calibre are you running?

4.23.2

Which version of the DeDRM plugin are you running?

v10.0.3

If applicable, which version of the Kindle software are you running?

1.17.0

Log output

calibre, version 4.23.0
錯誤: 未處理的例外: <b>TypeError</b>:ExpandEnvironmentStrings() argument 1 must be unicode, not str

calibre 4.23 [64bit]  embedded-python: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.16+
Windows: ('7', '6.1.7601', 'SP1', u'Multiprocessor Free')
Interface language: zh_TW
Successfully initialized third party plugins: DeDRM (10, 0, 3) && Obok DeDRM (10, 0, 3)
Traceback (most recent call last):
  File "calibre_plugins.obok_dedrm.action", line 97, in launchObok
  File "calibre_plugins.obok_dedrm.obok.obok", line 315, in __init__
TypeError: ExpandEnvironmentStrings() argument 1 must be unicode, not str
ElleKayEm commented 1 year ago

@noDRM will need to take a look. In the meantime, you could use Apprentice Harper's 6.8.1 which should be fine with calibre 4.23 and Kindle 1.17.

WasiGG commented 1 year ago

@noDRM will need to take a look. In the meantime, you could use Apprentice Harper's 6.8.1 which should be fine with calibre 4.23 and Kindle 1.17.

Thanks for the reply. Does Apprentice Harper's 6.8.1 still work now? I used actual Apprentice Harper's 6.8.1 before (last using was on 10/8 this year), and it worked for both Kobo and Kindle. But when I used the same environment yesterday, it didn't work (it showed the e-book couldn't be decrypted) for Kobo, and it also didn't work for Kindle (couldn't download e-book from kindle app)

I had checked the readme file of this new version, so I ask this question: "The v10.0.0 versions of this plugin should both work with Calibre 5.x (Python 3) as well as Calibre 4.x and lower (Python 2). If you encounter issues with this plugin in Calibre 4.x or lower, please open a bug report."

ElleKayEm commented 1 year ago

DeDRM 6.8.1 should work in most cases on a book downloaded with Kindle 1.17. Should work fine with books downloaded via ADE 2.0.1 too. Not sure about Kobo and and Obok 6.8.1.

noDRM commented 1 year ago

Thanks for the report. The 10.0.X versions are supposed to work with Calibre 4, too, but since I don't use all the different DRMs myself it's hard to figure out when some stuff is broken. Can you give the latest master version ( 3151dbbd98cf90215b36951ea33a0ae4df4054b7 ) a go and see if that fixes the issue? You can download it here: https://github.com/noDRM/DeDRM_tools/suites/10103689810/artifacts/492652498

WasiGG commented 1 year ago

Thanks for the reply. After I tried the new version, it showed another error: calibre, version 4.23.0 錯誤: Obok DeDRM v10.0.3:

No userkeys found to decrypt books with. No point in proceeding. Thanks.

noDRM commented 1 year ago

Can you read / access the book in question through the Kobo application without any issue?

WasiGG commented 1 year ago

Yes, the books can be opened and read in the Kobo application.