Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-27-2009, 06:30 PM   #1
BookLoverToo
Enthusiast
BookLoverToo doesn't litterBookLoverToo doesn't litter
 
Posts: 40
Karma: 104
Join Date: Mar 2009
Device: Sony PRS-505
What's wrong with this epub file?

I bought the latest Diana Gabaldon book from Shortcovers.com in epub, and try to read it in Calibre. When trying to view, the following error comes up. DRM-disinfecting software also produces the same error. Does anyone know what the root cause of this is (in non-developer English please - I don't fully understand the error message) and if it can be fixed?

Interestingly, ADE and my Sony can open and read the file just fine.

The error is:
Traceback (most recent call last):
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/gui2/viewer/main.py", line 59, in run
Thread.run(self)
File "threading.pyo", line 477, in run
File "calibre/ebooks/oeb/iterator.pyo", line 140, in __enter__
File "calibre/customize/conversion.pyo", line 208, in __call__
File "calibre/ebooks/epub/input.pyo", line 106, in convert
File "calibre/utils/zipfile.pyo", line 1013, in extractall
File "calibre/utils/zipfile.pyo", line 1001, in extract
File "calibre/utils/zipfile.pyo", line 1039, in _extract_member
File "calibre/utils/zipfile.pyo", line 949, in open
BadZipfile: File name in directory "OEBPS/Ga" id="f035" media-type="image/jp" and header "OEBPS/Gaba_9780307372338_epub_c79_r1.htm" differ.

Thanks for your help.
BookLoverToo is offline   Reply With Quote
Old 09-27-2009, 10:34 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Calibre does not support DRM. So trying to view it with Calibre's viewer will not work.

As for removing DRM, I have no idea what the issue is.
JSWolf is offline   Reply With Quote
Advert
Old 09-27-2009, 11:08 PM   #3
BookLoverToo
Enthusiast
BookLoverToo doesn't litterBookLoverToo doesn't litter
 
Posts: 40
Karma: 104
Join Date: Mar 2009
Device: Sony PRS-505
Quote:
Originally Posted by JSWolf View Post
Calibre does not support DRM. So trying to view it with Calibre's viewer will not work.

As for removing DRM, I have no idea what the issue is.
I guess I wasn't very clear. I know that Calibre doesn't support drm, but the interesting thing is that with this file, it gives the error even prior to the drm message that you would usually get, which suggests to me an issue with the epub file (?container) itself. I don't know enough about the different epub standards to know why it might work with ADE/Sony, but not other programs, or what this error truly means in terms of the structure of the file/container.
BookLoverToo is offline   Reply With Quote
Old 09-28-2009, 09:36 AM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The issue is that there are some ePubs are made with a directory that is invalidly named and when the script tries to write out this directory, it fails. The solution is to get this directory out of the ePub file. ZIP would fix it. Another way is to extract all the other files/directories and then remake the ePub without the invalid directories. Then run the script to remove the DRM and you should be good to go.
JSWolf is offline   Reply With Quote
Old 09-28-2009, 10:02 AM   #5
BookLoverToo
Enthusiast
BookLoverToo doesn't litterBookLoverToo doesn't litter
 
Posts: 40
Karma: 104
Join Date: Mar 2009
Device: Sony PRS-505
Is there anyone out there good enough to fix the script to deal with this issue on the fly? Do we think this is a purposeful attempt to nix the script, or is this just sloppy epub making? Why is ADE OK with this?
BookLoverToo is offline   Reply With Quote
Advert
Old 09-29-2009, 07:30 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by BookLoverToo View Post
Is there anyone out there good enough to fix the script to deal with this issue on the fly? Do we think this is a purposeful attempt to nix the script, or is this just sloppy epub making? Why is ADE OK with this?
ADE is OK with that because there is nothing referencing those directories so ADE just ignores them.
JSWolf is offline   Reply With Quote
Old 10-02-2009, 11:41 AM   #7
adullday
Enthusiast
adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.
 
Posts: 35
Karma: 483720
Join Date: Aug 2009
Device: none
I've had similar issues with several epub books. I think that the zlib library used by python (and maybe Calibre?) is having trouble unzipping certain epubs.

I was able to fix the issue by unzipping the original file using the built in decompression program in OSX (rename the file from mybook.epub to mybook.zip and double click on it). I forget what I used in Windows... it might have been the built in program, or maybe WinZip. I avoided using the command line unzip which uses the zlib library.

Then I just rezipped it using the command line zip (or, on Windows, the cygwin version of zip):

Code:
cd "epub directory"
zip -X0 "full path to new epub file" mimetype
zip -rDX9 "full path to new epub file" * -x "*.DS_Store" -x mimetype
This should be done before using DRM disinfection.

Credit goes to pdurrant at https://www.mobileread.com/forums/showthread.php?t=55681 for the command line wizardry.

(I'm not sure how to zip it in Windows without cygwin.)

After rezipping it worked fine.
adullday is offline   Reply With Quote
Old 10-14-2009, 09:02 PM   #8
BookLoverToo
Enthusiast
BookLoverToo doesn't litterBookLoverToo doesn't litter
 
Posts: 40
Karma: 104
Join Date: Mar 2009
Device: Sony PRS-505
Thanks for the link to the other thread, adullday. The applescript worked perfectly on another file I encountered with the same issue.
BookLoverToo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub file size Adjust ePub 16 10-27-2010 11:55 AM
How can i convert HTML or txt file to EPUB file ? guguqiaqia ePub 7 05-28-2010 09:15 PM
What is wrong with this EPUB? bavardage ePub 3 10-09-2009 02:04 AM
Calibre: wrong drawings when converting Pdf to epub gillesB. Calibre 1 05-01-2009 12:48 PM
Calibre converts wrong file mrmikel Calibre 2 04-14-2009 06:15 AM


All times are GMT -4. The time now is 09:29 AM.


MobileRead.com is a privately owned, operated and funded community.