02-01-2020, 08:37 AM | #421 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
At first glance, it appears like an embedded image href of that nature should already be dealt with correctly (from a regex point of view). I'll have to take a closer look. But that's going to be in KindleUnpack itself rather than the plugin.
|
02-01-2020, 02:34 PM | #422 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The problem with links like this is that there's nothing to "correct." KindleBook covers are not "pages" as such. They're just typically images and nothing else. As such, if the hrefs were indeed "correct," they would still be illegal epub hrefs insofar as they point directly to images. Which is not supported in epub. There's no good way to handle this situation without inventing pages to display these images (which is not likely something that KU is going to do). So even if they were "correct" they'd still need to be fixed before they were usable in an epub. It's a bit of a damned-if-you-do-damned-if you-don't situation.
In all likelihood, kindlebooks that contain these kinds of links after running KindleUnpack on them were probably not actually made from epubs to begin with. We try to make it very clear that KindleUnpack's KF8 to Epub "conversion" is only an approximation. If it (the KindleBook) wasn't made from an epub, the resulting epub is not guaranteed to be valid. The bottom line is the the inline html toc and the ncx both need hrefs to pages not images. And if there was no page in the kindlebook, we really can't go making one up. |
Advert | |
|
02-01-2020, 04:27 PM | #423 | |
Wizard
Posts: 1,030
Karma: 1189271
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
In my files, they all have a cover page, although that might not be the case for every book. Also, KU would have to figure out which page is the cover. Thats ok, it is very simple to correct this, anyway. Thanks! |
|
02-01-2020, 07:40 PM | #424 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm not ruling out doing something about it. I'm just nor sure what, yet.
|
04-29-2020, 01:03 AM | #425 |
Mint Magic
Posts: 22
Karma: 10
Join Date: Oct 2018
Device: Kobo Forma, Kindle Oasis
|
I'm using the latest version of Calibre, and I have the tools from Apprentice Alf's blog (here) downloaded and installed.
Tonight I downloaded a book in AZW4 format. I'd like to change that to PDF or epub so I can read it on my iBooks app. I downloaded and successfully installed KindleUnpack. When I select the book, and click the KindleUnpack button along the toolbar, there's a red lock and the menu is greyed out. Now, in the previous response to someone else a few pages back, your instruction was to download the DRM removal tool - but I've already done that, I use those tools regularly. What else could be going wrong? |
Advert | |
|
04-29-2020, 04:22 AM | #426 | |
The Grand Mouse 高貴的老鼠
Posts: 72,285
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
07-06-2020, 08:18 AM | #427 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
unicode argument expected
Intrigued by this post about Kindle Editions with Audio-Video ebooks, I have downloaded one. Expectedly, It gets delivered to K3, PW3, and K4PC in the AZW/MOBI format with no audio or video media files.
I Alf-Harpered it and was just curious to inspect the source html, but then got this error message from KindleUnpack plugin: Is this particular to that type of book or only a mundane error? BTW the source seems to have been unpacked anyway and I can inspect it. Last edited by PoP; 07-09-2020 at 02:37 PM. Reason: fixed link |
07-06-2020, 12:07 PM | #428 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That there is an error displaying an error! That shouldn't really happen regardless of what kind of book it is (though I've never downloaded one of the books you're talking about). I'll have to take a look at the area in question. Thanks for the info.
|
07-06-2020, 12:52 PM | #429 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Give this version a whirl and see if the error for that book is "properly" shown, now.
You still may get an error with that particular book, but it should be a different one. One that will hopefully give a better clue as to what the underlying unpacking engine doesn't like about it. Last edited by DiapDealer; 07-06-2020 at 09:48 PM. Reason: Remove attachment |
07-06-2020, 01:51 PM | #430 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
^
Exactly, a different error: Code:
calibre, version 4.20.0
ERREUR : Exception non gérée: <b>AttributeError</b>:'unicode' object has no attribute 'write'
calibre 4.20 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 2.7.16+
Windows: ('10', '10.0.19041', 'SP0', u'Multiprocessor Free')
Interface language: fr
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 33, 0) && DeDRM (6, 8, 0) && Package KFX (from KFX Input) (1, 33, 0) && Count Pages (1, 10, 0) && KFX metadata reader (from KFX Input) (1, 33, 0) && KFX Input (1, 33, 0) && KindleUnpack - The Plugin (0, 82, 2) && TTS to MP3 (0, 4, 0) && KindleXRay (0, 0, 3) && X-Ray Creator (3, 2, 1) && Obok DeDRM (6, 7, 0) && Hyphenate This! (0, 0, 9) && Set KFX metadata (from KFX Output) (1, 43, 0) && KFX Output (1, 43, 0) && APNX Generator (1, 1, 0) && EpubCheck (0, 2, 2)
Traceback (most recent call last):
File "calibre_plugins.kindleunpack_plugin.action", line 269, in unpack_ebook
File "calibre_plugins.kindleunpack_plugin.utilities", line 113, in showErrorDlg
File "traceback.py", line 233, in print_exc
File "traceback.py", line 124, in print_exception
File "traceback.py", line 13, in _print
AttributeError: 'unicode' object has no attribute 'write'
|
07-06-2020, 06:18 PM | #431 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Ack! That's still not the error message I was hoping to get. I'm going to have to rethink my polyglot error dialog. It works for calibre-py3, but not calibre-py2. When I updated the plugin to accommodate both, I didn't check to see that error conditions worked for both versions of python. I'll get it figured out and post another test version.
Thanks for the free test case link! |
07-06-2020, 09:57 PM | #432 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The image resources in that book are pretty messed up. I fixed the error dialog error that I inadvertently introduced with my changes to support both the Python 2 and the upcoming Python 3 versions of calibre. And I patched the kindleunpack core engine to test for cover thumbnail image indexes that are somehow out of range. I'll see about making that change permanent in the kindleunpack repository.
The bottom line is that even though you may have gotten the html unpacked, you might not have been getting all of the images from that book unpacked (and you still might not, given all the unrecognized image resources and sections not containing recognized resources that I see in the debug output). Give this version a whirl on that book (same version number as the last test version ... sorry). EDIT: Removed beta attachment since it's been incorporated in the official release (first page of the thread). Last edited by DiapDealer; 09-25-2020 at 11:36 AM. Reason: Remove beta attachment |
07-07-2020, 01:31 AM | #433 | |
Bibliophagist
Posts: 39,865
Karma: 154464500
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Spoiler:
Also I modified line 35 in action.py from: Code:
dont_add_to = frozenset(['menubar-device', 'toolbar-device', 'context-menu-device']) Code:
dont_add_to = frozenset(['context-menu-device']) |
|
07-07-2020, 06:15 AM | #434 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Yeah, that's the same output I was seeing. That book's a bit of a mess. Clearly the process to strip out the multi-media resources and present this thing as a mobi is a bit less thorough than it could be.
Thanks for reminding me about the menu thing. I'll incorporate that before officially releasing v0.82.2 of the plugin, too. |
07-07-2020, 06:44 AM | #435 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,007
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
|
Tags |
mobi2mobi |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] EpubMerge | JimmXinu | Plugins | 541 | 09-10-2024 11:05 AM |
[GUI Plugin] EpubSplit | JimmXinu | Plugins | 443 | 08-13-2024 03:20 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Ex Libris | AlPe | Plugins | 87 | 10-10-2020 03:10 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |