apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.53k stars 1.51k forks source link

Issues removing DRM from a purchased kindle book on amazon #1141

Open MariaMeier opened 4 years ago

MariaMeier commented 4 years ago

I have a kobo so need it in EPUB format. I have downloaded and removed DRM in the past but not since Amazon changed their file format to the KFX-ZIP

Any help would be appreciated

calibre Debug log calibre 3.48 embedded-python: True is64bit: True Darwin-15.6.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '15.6.0', 'Darwin Kernel Version 15.6.0: Thu Jun 21 20:07:40 PDT 2018; root:xnu-3248.73.11~1/RELEASE_X86_64') Python 2.7.15 OSX: ('10.11.6', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 32, 0) && DeDRM (6, 8, 0) && Package KFX (from KFX Input) (1, 32, 0) && KFX metadata reader (from KFX Input) (1, 32, 0) && KFX Input (1, 32, 0) && Set KFX metadata (from KFX Output) (1, 42, 0) && KFX Output (1, 42, 0) && Kindle hi-res covers (0, 4, 0) && Kindle Collections (1, 7, 26) && KindleUnpack - The Plugin (0, 82, 1) calibre 3.48 embedded-python: True is64bit: True Darwin-15.6.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '15.6.0', 'Darwin Kernel Version 15.6.0: Thu Jun 21 20:07:40 PDT 2018; root:xnu-3248.73.11~1/RELEASE_X86_64') Python 2.7.15 OSX: ('10.11.6', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 32, 0) && DeDRM (6, 8, 0) && Package KFX (from KFX Input) (1, 32, 0) && KFX metadata reader (from KFX Input) (1, 32, 0) && KFX Input (1, 32, 0) && Set KFX metadata (from KFX Output) (1, 42, 0) && KFX Output (1, 42, 0) && Kindle hi-res covers (0, 4, 0) && Kindle Collections (1, 7, 26) && KindleUnpack - The Plugin (0, 82, 1) devicePixelRatio: 1.0 logicalDpi: 72.0 x 72.0 physicalDpi: 94.0000014117 x 95.0000014268 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.40] splash screen shown [0.40] Initializing db... [0.69] db initialized [0.69] Constructing main UI... [2.94] main UI initialized... [2.94] Hiding splash screen [2.95] splash screen hidden [2.95] Started up in 2.95 seconds with 1800 books Gather KFX-ZIP (from KFX Input) 1.32.0: Importing /Users/mac/Documents/Kindle Library/B07BSWX53B_EBOK/B07BSWX53B_EBOK.azw Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as /var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/PZOb6z.kfx-zip DeDRM v6.8.0: Trying to decrypt PZOb6z.kfx-zip Using Library AlfCrypto DLL/DYLIB/SO Decrypting KFX-ZIP ebook: PZOb6z Found 0 keys to try after 0.1 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2cf4cadd-4eb7-4f10-81b9-a67d185e1320.voucher DeDRM v6.8.0: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key DeDRM v6.8.0: Looking for new default Kindle Key after 0.1 seconds Found k4Mac kinf2018 file: /Users/mac/Library/Application Support/Kindle/storage/.kinf2018 Found k4Mac kinf2011 file: /Users/mac/Library/Application Support/Kindle/storage/.kinf2011 Decrypted key file using IDString 'a5867a78094d' and UserName 'mac' Decrypted key file using IDString 'a5867a78094d' and UserName 'mac' DeDRM v6.8.0: Found 2 new keys Decrypting KFX-ZIP ebook: PZOb6z Got DSN key from database default_key_2 Got DSN key from database default_key_1 Found 1 keys to try after 1.9 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.2cf4cadd-4eb7-4f10-81b9-a67d185e1320.voucher DeDRM v6.8.0: Ultimately failed to decrypt after 1.9 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 625, in run File "calibre_plugins.dedrm.init", line 575, in KindleMobiDecrypt DeDRMError: DeDRM v6.8.0: Ultimately failed to decrypt after 1.9 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Package KFX (from KFX Input) 1.32.0: Packaging /var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/PZOb6z.kfx-zip Processing container: B07BSWX53B_EBOK.azw Running file type plugin Package KFX (from KFX Input) failed with traceback: Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.kfx_input.package_filetype", line 21, in run File "calibre_plugins.kfx_input.package_filetype", line 33, in run_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 87, in convert_to_single_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 182, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 289, in get_container KFXDRMError: Book container B07BSWX53B_EBOK.azw has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for /var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/g9r7ah_add_books/0/B07BSWX53B_EBOK.kfx-zip Added Guilty Sin (ALFA Investigations Book 4) to db in: 0.1 Added 1 books in 7.6 seconds Worker Launch took: 0.435785055161 Job: 0 Convert book 1 of 1 (Guilty Sin (ALFA Investigations Book 4)) finished Convert book 1 of 1 (Guilty Sin (ALFA Investigations Book 4)) Conversion options changed from defaults: verbose: 2 read_metadata_from_opf: u'/var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/lHClb8.opf' allow_conversion_with_errors: True cover: u'/var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/HnG2Iw.jpeg' output_profile: u'kobo' Resolved conversion options calibre version: 3.48.0 {'allow_conversion_with_errors': True, 'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0.0, 'book_producer': None, 'change_justification': u'original', 'chapter': u"//[((name()='h1' or name()='h2') and re:test(., '\s((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': u'/var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/HnG2Iw.jpeg', 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'dont_split_on_page_breaks': False, 'duplicate_links_in_toc': False, 'embed_all_fonts': False, 'embed_font_family': None, 'enable_heuristics': False, 'epub_flatten': False, 'epub_inline_toc': False, 'epub_toc_at_end': False, 'epub_version': u'2', 'expand_css': False, 'extra_css': None, 'extract_to': None, 'filter_css': u'', 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x10cf57310>, '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_default_epub_cover': False, 'no_inline_navbars': False, 'no_svg_cover': False, 'output_profile': <calibre.customize.profiles.KoboReaderOutput object at 0x10cf57b90>, 'page_breaks_before': u'/', 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': u'/var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/lHClb8.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': u'', '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': '[]', 'unsmarten_punctuation': False, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: KFX Input running on /var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/YZ33zK.kfx-zip Software versions: KFX Input 1.32.0, calibre 3.48, Darwin-15.6.0-x86_64-i386-64bit KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290 Converting /var/folders/c7/lv4t41bd0fd102m25fxptprw0000gn/C/calibre_3.48.0_tmp_e6n3Vj/YZ33zK.kfx-zip Processing container

ElleKayEm commented 4 years ago

Use Kindle for Mac 1.26 or earlier. Alternatively disable downloads of the KFX format. See this post:

https://www.mobileread.com/forums/showthread.php?t=283371

MariaMeier commented 4 years ago

Thanks for your response and I will try this, but as I was reading all the post the are all related to the KFX format and error. I just want to understand this. My Calibre has the KFX Input plugin installed and it recognizes the book as KFX format, its only when I try to convert to EPUB that the DRM error message comes up. Is there anything else I should be doing in?

Maria Meier CFO / Controller CAN-AK Industrial Services Inc. Bay 113, 4712 13 Street NE Calgary, Alberta, Canada T2E 6P1 1.587.353.4452 - Main Office mmeier@can-ak.ca WWW.CAN-AK.cahttp://www.can-ak.ca/ [A close up of a sign Description automatically generated]

From: ElleKayEm notifications@github.com Sent: July 1, 2020 3:38 AM To: apprenticeharper/DeDRM_tools DeDRM_tools@noreply.github.com Cc: Maria Meier mmeier@can-ak.ca; Author author@noreply.github.com Subject: Re: [apprenticeharper/DeDRM_tools] Issues removing DRM from a purchased kindle book on amazon (#1141)

Use Kindle for Mac 1.26 or earlier. Alternatively disable downloads of the KFX format. See this post:

https://www.mobileread.com/forums/showthread.php?t=283371

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/apprenticeharper/DeDRM_tools/issues/1141#issuecomment-652310709, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEJ3ZVS3P4GRG23ABJ7EL3RZL7Y7ANCNFSM4ONAYJNQ.

ElleKayEm commented 4 years ago

DeDRM 6.8 can't handle KFX format from Kindle for Mac (or PC) version 1.27 or later. So either download a new copy with an earlier version or you can turn off KFX downloads and re-download in the older format. (Only problem are books which require the latest Kindle app, but those aren't too common. It will say on the book's product page if it is.)