View Single Post
Old 08-18-2011, 03:10 PM   #1
MichaelKaufman
Junior Member
MichaelKaufman began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2011
Device: none
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.

Except...

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:
<guide>
<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”/>
</guide>

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
Thanks, Michael
MichaelKaufman is offline   Reply With Quote