apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.57k stars 1.52k forks source link

DRM Still Remains #1510

Open Andrius2015 opened 3 years ago

Andrius2015 commented 3 years ago

I apologize if it has been posted before (as I have limited knowledge of the intricacies of this process), however, I am wondering if I am doing something wrong. I am using Calibre 5.10 and have installed (successfully) DRM 7.0.2 and also tried with 7.0.3, but still, the DRM remains. I have also tried to use earlier versions of calibre and accordingly, the DRM - but I have the same error.

After conversion, the DRM still remains and the debug content is below: Thanks for any assist!

calibre Debug log calibre 5.10.1 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: en_GB Successfully initialized third party plugins: DeDRM (7, 0, 2) && Obok DeDRM (6, 7, 0) calibre 5.10.1 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: en_GB Successfully initialized third party plugins: DeDRM (7, 0, 2) && Obok DeDRM (6, 7, 0) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 81.55183946488295 x 81.64285714285714 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... [0.38] splash screen shown [0.38] Initializing db... [0.38] db initialized [0.38] Constructing main UI... [0.84] main UI initialized... [0.84] Hiding splash screen Starting QuickView Traceback (most recent call last): File "calibre\gui2\ui.py", line 134, in init File "calibre\gui2\ui.py", line 152, in init_iaction File "calibre\customize__init.py", line 616, in load_actual_plugin 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 192, in exec_module File "calibre_plugins.obok_dedrm.action", line 24, in File "calibre\customize\zipplugin.py", line 192, in exec_module File "calibre_plugins.obok_dedrm.dialogs", line 30, in File "calibre\customize\zipplugin.py", line 192, in exec_module File "calibre_plugins.obok_dedrm.utilities", line 10, in ModuleNotFoundError: No module named 'StringIO' [4.36] splash screen hidden [4.36] Started up in 4.36 seconds with 5 books Worker Launch took: 0.05 seconds Job: 0 Convert book 1 of 1 (Book) finished Convert book 1 of 1 (Book)

Conversion options changed from defaults:

  read_metadata_from_opf: 'C:\\Users\\USER\\AppData\\Local\\Temp\\calibre_i3zd15rp\\57ejmc5m.opf'

  output_profile: 'generic_eink'

  pdf_sans_family: 'MS Shell Dlg 2'

  cover: 'C:\\Users\\USER\\AppData\\Local\\Temp\\calibre_i3zd15rp\\19doi38m.jpeg'

  pdf_serif_family: 'MS Shell Dlg 2'

  verbose: 2

Resolved conversion options

calibre version: 5.10.1

{'asciiize': False,

 'author_sort': None,

 'authors': None,

 'base_font_size': 0.0,

 'book_producer': None,

 'change_justification': 'original',

 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "

            "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "

            "'i')) or @class = 'chapter']",

 'chapter_mark': 'pagebreak',

 'comments': None,

 'cover': 'C:\\Users\\USER\\AppData\\Local\\Temp\\calibre_i3zd15rp\\19doi38m.jpeg',

 'custom_size': None,

 'debug_pipeline': None,

 'dehyphenate': True,

 'delete_blank_paragraphs': True,

 'disable_font_rescaling': False,

 'duplicate_links_in_toc': False,

 'embed_all_fonts': False,

 'embed_font_family': None,

 'enable_heuristics': False,

 'expand_css': False,

 'extra_css': None,

 'filter_css': '',

 'fix_indents': True,

 'font_size_mapping': None,

 'format_scene_breaks': True,

 'html_unwrap_factor': 0.4,

 'input_encoding': None,

 'input_profile': <calibre.customize.profiles.InputProfile object at 0x07DE29D0>,

 'insert_blank_line': False,

 'insert_blank_line_size': 0.5,

 'insert_metadata': False,

 'isbn': None,

 'italicize_common_cases': True,

 'keep_ligatures': False,

 'language': None,

 'level1_toc': None,

 'level2_toc': None,

 'level3_toc': None,

 'line_height': 0.0,

 'linearize_tables': False,

 'margin_bottom': 5.0,

 'margin_left': 5.0,

 'margin_right': 5.0,

 'margin_top': 5.0,

 'markup_chapter_headings': True,

 'max_toc_links': 50,

 'minimum_line_height': 120.0,

 'no_chapters_in_toc': False,

 'no_inline_navbars': False,

 'output_profile': <calibre.customize.profiles.GenericEink object at 0x07DE2B50>,

 'page_breaks_before': "//*[name()='h1' or name()='h2']",

 'paper_size': 'letter',

 'pdf_add_toc': False,

 'pdf_default_font_size': 20,

 'pdf_footer_template': None,

 'pdf_header_template': None,

 'pdf_hyphenate': False,

 'pdf_mark_links': False,

 'pdf_mono_family': 'Courier',

 'pdf_mono_font_size': 16,

 'pdf_odd_even_offset': 0.0,

 'pdf_page_margin_bottom': 72.0,

 'pdf_page_margin_left': 72.0,

 'pdf_page_margin_right': 72.0,

 'pdf_page_margin_top': 72.0,

 'pdf_page_number_map': None,

 'pdf_page_numbers': False,

 'pdf_sans_family': 'MS Shell Dlg 2',

 'pdf_serif_family': 'MS Shell Dlg 2',

 'pdf_standard_font': 'serif',

 'pdf_use_document_margins': False,

 'prefer_metadata_cover': False,

 'preserve_cover_aspect_ratio': False,

 'pretty_print': False,

 'pubdate': None,

 'publisher': None,

 'rating': None,

 'read_metadata_from_opf': 'C:\\Users\\USER\\AppData\\Local\\Temp\\calibre_i3zd15rp\\57ejmc5m.opf',

 'remove_fake_margins': True,

 'remove_first_image': False,

 'remove_paragraph_spacing': False,

 'remove_paragraph_spacing_indent_size': 1.5,

 'renumber_headings': True,

 'replace_scene_breaks': '',

 'search_replace': '[]',

 'series': None,

 'series_index': None,

 'smarten_punctuation': False,

 'sr1_replace': None,

 'sr1_search': None,

 'sr2_replace': None,

 'sr2_search': None,

 'sr3_replace': None,

 'sr3_search': None,

 'start_reading_at': None,

 'subset_embedded_fonts': False,

 'tags': None,

 'timestamp': None,

 'title': None,

 'title_sort': None,

 'toc_filter': None,

 'toc_threshold': 6,

 'toc_title': None,

 'transform_css_rules': '[]',

 'uncompressed_pdf': False,

 'unit': 'inch',

 'unsmarten_punctuation': False,

 'unwrap_lines': True,

 'use_auto_toc': False,

 'use_profile_size': False,

 'verbose': 2}

InputFormatPlugin: MOBI Input running

on C:\Users\USER\AppData\Local\Temp\calibre_i3zd15rp\utfgrd6f.azw

Found KF8 MOBI of type 'standalone'

Traceback (most recent call last):

  File "runpy.py", line 194, in _run_module_as_main

  File "runpy.py", line 87, in _run_code

  File "site.py", line 82, in <module>

  File "site.py", line 77, in main

  File "site.py", line 49, in run_entry_point

  File "calibre\utils\ipc\worker.py", line 216, in main

  File "calibre\gui2\convert\gui_conversion.py", line 41, in gui_convert_override

  File "calibre\gui2\convert\gui_conversion.py", line 28, in gui_convert

  File "calibre\ebooks\conversion\plumber.py", line 1108, in run

  File "calibre\customize\conversion.py", line 245, in __call__

  File "calibre\ebooks\conversion\plugins\mobi_input.py", line 47, in convert

  File "calibre\ebooks\mobi\reader\mobi8.py", line 86, in __call__

  File "calibre\ebooks\mobi\reader\mobi6.py", line 158, in check_for_drm

calibre.ebooks.DRMError: The book
ElleKayEm commented 3 years ago

I'm not seeing DeDRM even trying to do anything here. If you're using beta DeDRM, might as well use the latest 7.0.3. What type of book is it? And how did you download it? We might be able to tell more with an import log: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-cannot-solve-my-problem-with-the-dedrm-plugin-and-now-i-need-to-post-a-log-how-do-i-do-that

Andrius2015 commented 3 years ago

I'm not seeing DeDRM even trying to do anything here. If you're using beta DeDRM, might as well use the latest 7.0.3. What type of book is it? And how did you download it? We might be able to tell more with an import log: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-cannot-solve-my-problem-with-the-dedrm-plugin-and-now-i-need-to-post-a-log-how-do-i-do-that

Interesting.... Thanks for the feedback. The book is from Amazon downloaded to kindle PC (v1.17 build 44183). I tried using 7.0.3 but it just gives me an error that the book is protected by DMR. I have had a functional calibre and DMR set up before on my old PC, and then had to get rid of it, so was trying to set up with a new one only to get this problem.

ElleKayEm commented 3 years ago

Should work if you downloaded the books with the installation of Kindle for PC currently on the same machine and user as calibre with DeDRM. Post an import log, and we'll figure it out.

Andrius2015 commented 3 years ago

Should work if you downloaded the books with the installation of Kindle for PC currently on the same machine and user as calibre with DeDRM. Post an import log, and we'll figure it out.

Thank you so much for telling me this! I didn't know that the kindle content has to be unlocked from the same user as the one where it was bought, for the process to work. I was trying to carry out the process on another machine (because I had PC issues). I now repeated all the processes on a single machine and it all worked. Thank you very much!!!

Why is this the case, that all the processes need to be on one machine?

ElleKayEm commented 3 years ago

Each installation of the Kindle app has a unique key, even when they are logged into the same account. DeDRM needs to be able to retrieve that key in order to be able to unlock the books downloaded with it.