View Single Post
Old 09-09-2010, 03:11 PM   #15
viktorz
Junior Member
viktorz began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2010
Location: California
Device: PRS-505
Quote:
Originally Posted by Jellby View Post
I think I've fixed it now, could you try the new 1.2 version?
No, it is not quite right yet. Please see file attached, specifically the method "file" that I have changed. See, I just replaced the slash? That makes it work, otherwise reading from zip fails because of the wrong slash:
Code:
Traceback (most recent call last):
  File "C:\Utils\epub2pdf\epubutils_2.py", line 493, in loadFile
    self.fileLoaded(unicode(filename))
  File "C:\Utils\epub2pdf\epubutils_2.py", line 497, in fileLoaded
    self.epub = ePUB(filename)
  File "C:\Utils\epub2pdf\epubutils_2.py", line 66, in __init__
    self.readMetadata()
  File "C:\Utils\epub2pdf\epubutils_2.py", line 110, in readMetadata
    pages = int(math.ceil(zfile.getinfo(file).compress_size/1024.0))
  File "C:\Python27\lib\zipfile.py", line 818, in getinfo
    'There is no item named %r in the archive' % name)
KeyError: "There is no item named u'OPS\\\\cover.xhtml' in the archive"
Attached Files
File Type: zip epubutils_win.zip (6.9 KB, 800 views)

Last edited by viktorz; 09-09-2010 at 03:18 PM.
viktorz is offline   Reply With Quote