|08-18-2011, 03:10 PM||#1|
Join Date: Jul 2011
Adding <guide> produces error: "Nonetype object has no attribute 'lower'
I'm in the final stages of creating my first eBook from CS5.5 -- under the tutelage of Anne-Marie Concepcion's very fine Lynda.com course.
My exports to Kindle work fine. Exports to ePub work fine. Once I upzip my epub file, I've had no problem making changes (in Dreamweaver) to the html files and the template.css file or changing the date and adding the identifier to the content.opf file. I rezip, rename, and all is well.
But when I add a <guide> section to content.opf (as is necessary for Apple), I always get an error message when I try to open it in Calibre.The message is:
AttributeError: 'NoneType' object has no attribute 'lower' File "site-packages\calibre\ebooks\metadata\opf2.py", line 992, in fget File "site-packages\calibre\ebooks\oeb\iterator.py", line 229, in __enter__ File "threading.py", line 483, in run File "site-packages\calibre\gui2\viewer\main.py", line 64, in runTraceback (most recent call last):
ERROR: Could not open ebook: 'NoneType' object has no attribute 'lower'calibre, version 0.8.14
I've tried only using just one of the reference lines in case there was a problem with one of the files, but no matter which one, it produces this message.
The code I added was:
<reference type=”cover” title=”Cover” href=”possibility_of_dreaming_cover.jpg”/>
<reference type=”title-page” title=”Title Page” href=”possibility_of_dreaming.html”/>
<reference type=”toc” title=”Table of Contents” href=”possibility_of_dreaming-4.html”/>
<reference type=”text” title=”text” href=” possibility_of_dreaming-5.html”/>
This may have nothing to do with it, but the "title" in those lines: what does this correspond to? Do I have to explicitly name items as "cover" "title page" "Table of Contents" and "text"? Or perhaps that isn't the issue at all.
Any help would be greatly appreciated
|08-19-2011, 04:31 AM||#2|
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Where do you place exactly the <guide>? And do you use those (wrong) curly quotes or simple straight quotes "like these"?
The "title" attribute is what the reading software would display if it showed the guide items, but I don't know if any ePUB reader uses the guide, there's the NCX table of contents, after all.
Before opening the ePUB, try validating it with epubcheck and/or flightcrew.
|08-19-2011, 06:39 PM||#3|
Join Date: Sep 2009
<meta content="[id of cover image in the manifest]" name="cover" />
You can do all this easily in Sigil without having to edit the OPF by hand.
|<guide>, nonetype object|
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|0.7.56 Crash on startup: "'QWidget' Object has no attribute 'fillier'"||MrAndreBB||Calibre||0||04-17-2011 01:44 PM|
|AttributeError: 'NoneType' object has no attribute 'replace' when trying to add books||tilleydog||Calibre||16||10-04-2010 04:29 AM|
|AttributeError: 'NoneType' object has no attribute 'lower||manada||Calibre||2||08-10-2010 10:54 PM|
|Error help: "Invalid input object: NoneType"||MichaelGray||ePub||1||02-14-2010 09:16 AM|
|'BookList' object has no attribute 'add_books' Error message||nomedia||Calibre||4||09-29-2008 01:50 AM|