Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2011, 12:13 AM   #1
apastuszak
Evangelist
apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.
 
Posts: 436
Karma: 125599
Join Date: Feb 2011
Location: Bensalem, PA
Device: Kindle Paperwhite, nook Glowlight Plus, Apple iPad Air 2
Tweak ePub Error on Fedora 15

Whenever I try to rebuild an ePub after tweaking it on Fedora 15, I get the following error:

calibre, version 0.8.4
ERROR: Unhandled exception: <b>error</b>:ushort format requires 0 <= number <= USHRT_MAX

Traceback (most recent call last):
File "site-packages/calibre/gui2/dialogs/tweak_epub.py", line 114, in rebuild
File "site-packages/calibre/gui2/dialogs/tweak_epub.py", line 86, in do_rebuild
File "zipfile.py", line 1071, in write
File "zipfile.py", line 348, in FileHeader
error: ushort format requires 0 <= number <= USHRT_MAX

Any ideas?
apastuszak is offline   Reply With Quote
Old 06-06-2011, 08:04 AM   #2
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
This error is discussed in the Modify ePub thread in the dev forums. It has already been fixed for the next Calibre release. It is caused by a change in Calibre 0.8.4 to use the timestamps from the zip file for files when exploding, rather than the system date/time. What this means is that in rare but nonethless existing circumstances, files that have no timestamp in the zip file will blow up when trying to zip them back up again.

The example ePub I found had this situation on the MimeType file. When you look at it in the file explorer, it shows no date present on the file when you look at it on the exploded ePub.

The workaround assuming you do not want to wait or run from source is to "touch" the files that have no timestamp when they are exploded. So look for any file(s) that have no timestamp in the exploded directly, and do an edit on them to cause them to now have a modified date. Obviously if it is a file like mimetype be sure to keep the content the same, either use an os touch command or just save from an editor on it.
kiwidude is offline   Reply With Quote
Advert
Old 06-06-2011, 09:15 AM   #3
apastuszak
Evangelist
apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.apastuszak reads for the sheer pleasure of reading.
 
Posts: 436
Karma: 125599
Join Date: Feb 2011
Location: Bensalem, PA
Device: Kindle Paperwhite, nook Glowlight Plus, Apple iPad Air 2
Thanks for the info. I went and filed a bug on the topic.
apastuszak is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Tweak ePub - new feature (0.7.20) GRiker Calibre 35 03-07-2012 08:56 AM
error while compiling calibre under fedora... samy2 Calibre 3 05-21-2011 01:01 PM
Setting Path for Tweak ePub Agama Calibre 6 12-03-2010 02:06 AM
Tweak epub and Simple CSS Editor Shadowman123 Calibre 11 09-30-2010 10:07 AM
Calibre on Fedora 12 kremkex Calibre 1 02-28-2010 03:56 PM


All times are GMT -4. The time now is 09:32 PM.


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