Error in content.opf causes ebook editor checking to fail

Bug #1319378 reported by SteveB on 2014-05-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Thanks for your responses to other things much appreciated
I thought I'd report this in case it's helpful

If I make a mistake in content.opf manifest, run checks in ebook editor falls over
For example (notice the item paths where I got confused)

<?xml version='1.0' encoding='utf-8'?>
<package xmlns="" xmlns:dc="" xmlns:dcterms="" xmlns:opf="" xmlns:xsi="" unique-identifier="67afb23f-0b1a-4a1d-aaa7-40cf4f5285a6" version="2.0">
    <dc:identifier id="67afb23f-0b1a-4a1d-aaa7-40cf4f5285a6" opf:scheme="uuid">67afb23f-0b1a-4a1d-aaa7-40cf4f5285a6</dc:identifier>
    <item href="Text/test.xhtml" id="id7" media-type="application/xhtml+xml"/>
    <item href="/fonts/Times-New-Roman.ttf" id="font1" media-type="application/x-font-truetype"/>
    <item href="/Styles/fonts.css" id="font_embed1" media-type="text/css"/>
    <item href="/Styles/styles.css" id="id13" media-type="text/css"/>
    <itemref idref="id7"/>

Here is output
calibre, version 1.36.0
ERROR: Unhandled exception: <b>AttributeError</b>:'NoneType' object has no attribute 'split'

calibre 1.36 isfrozen: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):
  File "site-packages\calibre\gui2\tweak_book\", line 69, in ans
  File "site-packages\calibre\gui2\tweak_book\", line 954, in check_requested
  File "site-packages\calibre\gui2\tweak_book\", line 198, in run_checks
  File "site-packages\calibre\ebooks\oeb\polish\check\", line 65, in run_checks
  File "site-packages\calibre\ebooks\oeb\polish\check\", line 218, in check_opf
  File "site-packages\calibre\ebooks\oeb\polish\", line 320, in exists
  File "site-packages\calibre\ebooks\oeb\polish\", line 317, in name_to_abspath
AttributeError: 'NoneType' object has no attribute 'split'

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers