Neither Calibre nor Kindle support the mobi file.
Closed this issue · 6 comments
I downloaded and imported sicp.mobi in Calibre, which fails with some kind of significant error. My Kindle 3rd Ed. complains as well. Any clue? Thank you guys for the conversion by the way.
calibre, version 0.8.38
ERROR: Could not open ebook: Unknown book type: 'E/NS# FB'
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/viewer/main.py", line 64, in run
Thread.run(self)
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/calibre/calibre/ebooks/oeb/iterator.py", line 205, in __enter__
{}, self.base)
File "/usr/lib/calibre/calibre/customize/conversion.py", line 204, in __call__
log, accelerators)
File "/usr/lib/calibre/calibre/ebooks/mobi/input.py", line 26, in convert
options.debug_pipeline, try_extra_data_fix=True)
File "/usr/lib/calibre/calibre/ebooks/mobi/reader.py", line 294, in __init__
raise MobiError('Unknown book type: %s' % repr(self.ident))
MobiError: Unknown book type: 'E/NS# FB'
Hi Andrea!
Sorry I don't know a thing about the Calibre platform, including whether it claims to support mobi or not. Also, the latest build hosted here works fine on my Kindle 3.
If you've absolutely ruled out any kind of transmission corruption, could you try your own build? It's the easiest thing in the world, trust me. We can't expect built artifacts to run indefinitely for everyone as hardware evolves, which is the whole point of sharing the source and build script here. Just find the latest version of mobigen/kindlegen, and the run the script. At worst you'd have to update the command line in the Ruby script (there may be changes to command line options, for example. You'd have to read the docs if it doesn't work the first time). And could you report back here if you're successful?
Ok I have downloaded kindlegen 2.8 and tried. It builds fine, and I can display it now. The command line was the following:
kindlegen -c1 -o mymobi.mobi ./content/sicp.opf
I have a lot of warnings like the following though.
Warning(prcgen):W14001: Hyperlink not resolved: c:\Users\*\sicp-kindle\content\ch2-Z-G-37.gif
...
Warning(prcgen):W14001: Hyperlink not resolved: Structure_an-puter_Programs
Warning(prcgen):W14001: Hyperlink not resolved:
Warning(prcgen):W14001: Hyperlink not resolved: Latin-1 Supplement [A0..FF]
Do I need to modify something in your opinion (haven't checked if I actually see all the images, because I don't have the original one...) ?
Oh do I need to launch the Ruby file for building instead?
No, rebuilding the xml shouldn't be necessary. Otherwise the script is a just a convenience for the command line: you could use it as a substitute for the command line you posted.
There may have been a few tolerable errors that didn't make any difference, but in general if links are not resolved that's bad. If the number of errors is roughly the same as the number of links in the XML (opf), then you're seriously broken.
FIrst thing to check with path issues is where you're running from. Hopefully you just need to find the right working directory and everything will be found.
EDIT: Disregard the following. Checking with Kindle Preview works fine, I have all the gifs and the links on chapter and sub chapter headers as well. I don't know why it gives me these warnings, but the final result is good!
Nope, doesn't work properly for me. I also pasted kindlegen.exe in content\ and executed kindlegen -c1 -o mymobi.mobi sicp.opf
from there with no luck.
It always returns a lot of warnings like:
Warning(prcgen):W14001: Hyperlink not resolved: C:\*\sicp-kindle\content\book-Z-H-14.html#%_idx_1300
Warning(prcgen):W14001: Hyperlink not resolved: C:\*\sicp-kindle\content\book-Z-H-10.html#%_idx_120
Warning(prcgen):W14001: Hyperlink not resolved: C:\*\sicp-kindle\content\book-Z-H-33.html#%_idx_5846
Warning(prcgen):W14001: Hyperlink not resolved: C:\*\sicp-kindle\content\book-Z-H-17.html#%_idx_2438
Opening the folder manually of course displays the right content folder, it looks like it doesn't like what is appended after html (I guess it corresponds to the item in the opf..., but there are 38 items there). Besides, all the gifs are not resolved....very weird...
Yeah, if you only have a handful of warnings, it's likely all fine. Those look like anchors that may have been in the original MIT HTML and even if they're broken they're probably not critical.
Welcome to Kindle publishing! If you re-run $ ruby build_book.rb ocx toc
, you'll get an updated publication date, which can really stir the soul for some people.