apprenticeharper / DeDRM_tools

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

I have the DRM and KFX plugin installed in Calibre but my ebooks won't convert #911

Open glorylamria opened 5 years ago

glorylamria commented 5 years ago

Hi this is my first time using Calibre, I already donwload DRM and KFX plugin, but the book still won't convert. Could you guys find out where's the error. Thanks

Convert book 1 of 1 (Becoming) Conversion options changed from defaults: pdf_serif_family: u'MS Shell Dlg 2' output_profile: u'generic_eink' verbose: 2 cover: u'C:\Users\user\AppData\Local\Temp\calibre_qtfex9\yperi3.jpeg' read_metadata_from_opf: u'C:\Users\user\AppData\Local\Temp\calibre_qtfex9\eq2aic.opf' Resolved conversion options calibre version: 4.0.0 {'allow_conversion_with_errors': False, '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'C:\Users\user\AppData\Local\Temp\calibre_qtfex9\yperi3.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': u'', '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 0x0596F450>, '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 0x0596F650>, 'page_breaks_before': u'/', 'paper_size': u'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': u'Courier', 'pdf_mono_font_size': 16, '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': u'Helvetica', 'pdf_serif_family': u'MS Shell Dlg 2', 'pdf_standard_font': u'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': u'C:\Users\user\AppData\Local\Temp\calibre_qtfex9\eq2aic.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': '[]', 'uncompressed_pdf': False, 'unit': u'inch', 'unsmarten_punctuation': False, 'unwrap_lines': True, 'use_auto_toc': False, 'use_profile_size': False, 'verbose': 2} InputFormatPlugin: KFX Input running on C:\Users\user\AppData\Local\Temp\calibre_qtfex9\boquow.kfx-zip Software versions: KFX Input 1.20.0, calibre 4.0, Windows-10-10.0.17134-SP0 KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290 Converting C:\Users\user\AppData\Local\Temp\calibre_qtfex9\boquow.kfx-zip Processing container: B079ZYWJJ8_EBOK.azw Traceback (most recent call last): File "calibre_plugins.kfx_input.init", line 100, in convert File "calibre_plugins.kfx_input.init", line 195, in convert_from_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 106, in convert_to_epub File "calibre_plugins.kfx_input.kfxlib.yj_book", line 160, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 267, in get_container KFXDRMError: Book container B079ZYWJJ8_EBOK.azw has DRM and cannot be converted P

KazuyDarklight commented 5 years ago

Same.

Ultrabenosaurus commented 5 years ago

If you're using Kindle for PC make sure it's v1.24.3 or lower with the auto-update setting turned off. Newer versions use a new KFX-ZIP format which Calibre / DeDRM can't touch. Same problem with Kindle firmware: at some point they updated Kindles to use that format, but I don't use a Kindle so not sure on the details of which versions use and which don't.

tenxt commented 5 years ago

Try this

Steps for DeDRM and KFX plugins with Kindle Book for Windows 10 PC:

  1. Download Kindle version 1.24.3 or less.
  2. Register/Login to your Amazon account.
  3. Buy the Kindle book you want on Amazon. Do not buy the rented version because it won't work.
  4. Wait for book to download on Kindle Window PC Program
  5. Download calibre
  6. Download DeDRM from apprenticeharper
  7. Unzip file
  8. Go in to calibre to add plugins under "Preferences". Click the unzipped DeDRM folder. Choose folder "DeDRM_calibre_plugin" and then click the zip file name "DeDRM_plugin" to add the plugin.
  9. Click ok on all and then "apply"
  10. Exit calibre and open again.
  11. Download the KFX plugin
  12. Go in to calibre to add plugins under "Preferences". Click the zip file "KFX Input" to add the plugin.
  13. Click ok on all and then "apply"
  14. Exit calibre and open again.
  15. Now click add books. Click folder "My Kindle Content." Then click the book you want to add.
  16. After the book is added, check the side of calibre to see if there was any change to "Format: azw." If the format changed anything like "Format: azw4" etc. then you have been successful.
  17. Now you can convert the book in to any other format you wish.
  18. Happy reading.
peet1 commented 5 years ago

Is there any way possible to convert kindle unlimited rented books? Even with kindle for pc v1.24.3 it shows the books in calibre as kfx-zip.

Ultrabenosaurus commented 5 years ago

@peet1 no, because you don't own KU books so that would be stealing not making a backup. Calibre / DeDRM are not software for stealing.

peet1 commented 5 years ago

I just like reading the books on my e-ink reader instead of an ipad. And I dont want to buy an additional kindle reader for this. so I dont intend to steal but to protect my eyes.

some years ago KU books could be de-drm'ed with calibre...

ElleKayEm commented 5 years ago

@glorylamria DRM removal happens when you first add the book to calibre. Here's how to get the log we need to see:

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

@peet1 Easy solution. Buy the book.

AbuJordan commented 4 years ago

I have a KFX book that I've imported from an Android device but it won't remove the DRM. I tried getting the book from the Kindle PC app but both older versions and latest version say "item not compatible with device." I think it's because the book is in Arabic. It works with my English books. Here's my log calibre Debug log calibre 3.14 embedded-python: True is64bit: False Windows-10-10.0.17763-SP0 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.17763') Python 2.7.12+ Windows: ('10', '10.0.17763', 'SP0', u'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 24, 0) && DeDRM (6, 5, 5) && Package KFX (from KFX Input) (1, 24, 0) && Set KFX metadata (from KFX Output) (1, 34, 0) && KFX Output (1, 34, 0) && KFX metadata reader (from KFX Input) (1, 24, 0) && KFX Input (1, 24, 0) calibre 3.14 embedded-python: True is64bit: False Windows-10-10.0.17763-SP0 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.17763') Python 2.7.12+ Windows: ('10', '10.0.17763', 'SP0', u'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 24, 0) && DeDRM (6, 5, 5) && Package KFX (from KFX Input) (1, 24, 0) && Set KFX metadata (from KFX Output) (1, 34, 0) && KFX Output (1, 34, 0) && KFX metadata reader (from KFX Input) (1, 24, 0) && KFX Input (1, 24, 0) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 120.0 x 120.0 physicalDpi: 141.76744186 x 142.134715026 Using calibre Qt style: True Starting up... Started up in 14.44 seconds with 9 books Gather KFX-ZIP (from KFX Input) 1.24.0: Importing C:/Users/Asus/Documents/Arabic books/yowmiyat/B07BSG3113/CR!28HQRFT46S7F91BA95M542D5R8V9.kfx Gather KFX-ZIP (from KFX Input): Gathered 7 file(s) as C:\Users\Asus\AppData\Local\Temp\calibre_xliwyo\5rafnr.kfx-zip Package KFX (from KFX Input) 1.24.0: Packaging C:\Users\Asus\AppData\Local\Temp\calibre_xliwyo\5rafnr.kfx-zip Processing container: CR!28HQRFT46S7F91BA95M542D5R8V9.kfx Processing container: CR!EG1KF185H96YD3VMZ81MF7M58BB6.kfx Processing container: CR!EJQ72C8PHX7EH7FK49AC0SBNKV71.kfx Processing container: CR!KFC83KY0J95X36AKCNDJSXG5GFJ1.kfx Processing container: CR!MQ66JCPNV53B3B1KHXWKK4GPZ7H6.kfx 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 171, 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 88, in convert_to_single_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 161, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 268, in get_container KFXDRMError: Book container CR!MQ66JCPNV53B3B1KHXWKK4GPZ7H6.kfx has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for C:\Users\Asus\AppData\Local\Temp\calibre_xliwyo\0d52fb_add_books\0\CR!28HQRFT46S7F91BA95M542D5R8V9.kfx-zip Added يوميّات هرّ (Arabic Edition) to db in: 0.3 Added 1 books in 1.0 seconds

ElleKayEm commented 4 years ago

First, you're using an old version of DeDRM which doesn't support KFX format. Update to the current 6.6.3. Second, I don't believe there's a currently a way to get the key from the Kindle Android app. So if you can't download the book with unmodified Kindle for PC version 1.24 (that is, no change to the renderer-test file), then I think you're out-of-luck.

AbuJordan commented 4 years ago

Thank you so much for responding. I tried a different route. I also have a kindle eink so I updated all the software plugins and entered the serial number for the key of my eink device, but it seems my key is still not working. Here's my error log.

calibre Debug log calibre 4.4 embedded-python: True is64bit: False Windows-10-10.0.17763-SP0 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.17763') Python 2.7.16+ Windows: ('10', '10.0.17763', 'SP0', u'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 24, 0) && DeDRM (6, 6, 3) && Package KFX (from KFX Input) (1, 24, 0) && Set KFX metadata (from KFX Output) (1, 34, 0) && KFX Output (1, 34, 0) && KFX metadata reader (from KFX Input) (1, 24, 0) && KFX Input (1, 24, 0) calibre 4.4 embedded-python: True is64bit: False Windows-10-10.0.17763-SP0 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.17763') Python 2.7.16+ Windows: ('10', '10.0.17763', 'SP0', u'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 24, 0) && DeDRM (6, 6, 3) && Package KFX (from KFX Input) (1, 24, 0) && Set KFX metadata (from KFX Output) (1, 34, 0) && KFX Output (1, 34, 0) && KFX metadata reader (from KFX Input) (1, 24, 0) && KFX Input (1, 24, 0) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 120.0 x 120.0 physicalDpi: 141.76744186 x 142.134715026 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.53] splash screen shown [0.53] Initializing db... [0.53] db initialized [0.53] Constructing main UI... [2.05] main UI initialized... [2.05] Hiding splash screen Storage number map: {(7L, 0L): [(3L, 'C')], (7L, 1L): [(1L, 'E')]} Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0310\6&CD0069A&0: StorageDeviceNumber(type=7L, number=1L, partition_number=0L) Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x310 devid=usb\vid_1949&pid_0004&rev_0310 devinst=8) {u'drive_letters': ['E'], u'pnp_id_map': {'E': u'\\?\usbstor#disk&ven_kindle&prod_internal_storage&rev_0310#6&cd0069a&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'}, u'readonly_drives': set([]), u'sort_map': {'E': (1L, 1L)}} Job: 0 Get device information started DeviceJob: 0 Get device information done, calling callback DeviceJob: 0 Get device information callback returned Job: 1 Set library information started DeviceJob: 1 Set library information done, calling callback DeviceJob: 1 Set library information callback returned Job: 2 Get list of books on device started DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None DEBUG: 0.0 USBMS: dirs are: E:\ documents DEBUG: 0.1 USBMS: scan from root False E:\documents DEBUG: 0.4 USBMS: count found in cache: 52, count of files in metadata: 52, need_sync: False DEBUG: 0.4 USBMS: Finished fetching list of books from device. oncard= None DEBUG: 0.4 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda DEBUG: 0.4 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb DeviceJob: 2 Get list of books on device done, calling callback DeviceJob: metadata_downloaded: Starting set_books_in_library DeviceJob: set_books_in_library: books to process= 52 DeviceJob: set_books_in_library finished: time= 0.00600004196167 DeviceJob: metadata_downloaded: updating views DeviceJob: metadata_downloaded: syncing DeviceJob: metadata_downloaded: refreshing ondevice DeviceJob: metadata_downloaded: sending metadata_available signal DeviceJob: 2 Get list of books on device callback returned Job: 0 Get device information finished No details available. Job: 1 Set library information finished No details available. Job: 2 Get list of books on device finished No details available. [23.92] splash screen hidden [23.92] Started up in 23.92 seconds with 10 books stdout+stderr from file dialog helper: ['', ''] piped data from file dialog helper: ['\xc9\x99Ft\xb3\xae\xb5\xe0\x87\xd6\xa27\xea\xb6\xf9\x93\xb1\x04\xe4\xa5\xd8*\x18h\xfa\x80\xe9\x11\xf45}\xb0', 'E:\documents\\xe2\x80\xab\xd9\x8a\xd9\x88\xd9\x85\xd9\x8a\xd9\x91\xd8\xa7\xd8\xaa \xd9\x87\xd8\xb1\xd9\x91\xe2\x80\xac (Arabic Edition)_B07BSG3113.kfx'] Gather KFX-ZIP (from KFX Input) 1.24.0: Importing E:\documents\‫يوميّات هرّ‬ (Arabic Edition)_B07BSG3113.kfx Gather KFX-ZIP (from KFX Input): Gathered 5 file(s) as C:\Users\Asus\AppData\Local\Temp\calibrex4y3te\favdn.kfx-zip DeDRM v6.6.3: Trying to decrypt favdn.kfx-zip Using Library AlfCrypto DLL/DYLIB/SO Decrypting KFX-ZIP ebook: favdn Got DSN key from database default_key Found 2 keys to try after 0.1 seconds Decrypting KFX DRM voucher: voucher DeDRM v6.6.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key DeDRM v6.6.3: Looking for new default Kindle Key after 0.1 seconds searching for kinfoFiles in C:\Users\Asus\AppData\Local No K4PC kindle.info/kinf/kinf2011 files have been found. DeDRM v6.6.3: Ultimately failed to decrypt after 0.1 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 624, in run File "calibre_plugins.dedrm.init", line 574, in KindleMobiDecrypt DeDRMError: DeDRM v6.6.3: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Package KFX (from KFX Input) 1.24.0: Packaging C:\Users\Asus\AppData\Local\Temp\calibrex4y3te\favdn.kfx-zip Processing container: CR!Q7HVKY45Z95GD0N85DG86R9GZJ0P.kfx Processing container: CR!SCA9GYNJCX6P71MZPHA9XF7552H5.kfx Processing container: metadata.kfx Processing container: ‫يوميّات هرّ‬ (Arabic Edition)_B07BSG3113.kfx 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 88, in convert_to_single_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 161, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 268, in get_container KFXDRMError: Book container ‫يوميّات هرّ‬ (Arabic Edition)_B07BSG3113.kfx has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for C:\Users\Asus\AppData\Local\Temp\calibre_x4y3te\y9sgjp_add_books\0\‫يوميّات هرّ‬ (Arabic Edition)_B07BSG3113.kfx-zip Added يوميات هر (Arabic Edition) to db in: 0.3 Added 1 books in 1.7 seconds

On Wed, Nov 27, 2019 at 1:07 PM ElleKayEm notifications@github.com wrote:

First, you're using an old version of DeDRM which doesn't support KFX format. Update to the current 6.63. Second, I don't believe there's a currently a way to get the key from the Kindle Android app. So if you can't download the book with unmodified Kindle for PC version 1.24 (that is, no change to the renderer-test file), then I think you're out-of-luck.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/apprenticeharper/DeDRM_tools/issues/911?email_source=notifications&email_token=AHZXYIQ2KT3SG7T4IJAW353QV2ZO3A5CNFSM4I53HNQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFKKRIQ#issuecomment-559196322, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHZXYIXUSFILX4YAX7DGOLDQV2ZO3ANCNFSM4I53HNQA .

ElleKayEm commented 4 years ago

Unless your Kindle has a firmware prior to 5.10.2, you will not be able to remove the DRM from KFX format books downloaded to it.

I assume you've already checked to see if there's any option to download from the website.