Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-21-2010, 02:29 PM   #1
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
Error converting EPUB to MOBI

Hi there,

When I try to convert EPUB files into MOBI files before sending them to my Kindle DX, it takes an unusually long time on Calibre, and at the end it fails with this error message:

Quote:
Python function terminated unexpectedly
string index out of range (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 103, in main
File "site.py", line 85, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 99, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 24, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 898, in run
File "site-packages\calibre\ebooks\mobi\output.py", line 182, in convert
File "site-packages\calibre\ebooks\mobi\writer.py", line 367, in __call__
File "site-packages\calibre\ebooks\mobi\writer.py", line 380, in _dump_stream
File "site-packages\calibre\ebooks\mobi\writer.py", line 395, in _generate_content
File "site-packages\calibre\ebooks\mobi\writer.py", line 1336, in _generate_images
File "site-packages\calibre\ebooks\mobi\writer.py", line 123, in rescale_image
File "site-packages\PIL\Image.py", line 653, in convert
File "site-packages\PIL\ImageFile.py", line 189, in load
File "site-packages\PIL\PngImagePlugin.py", line 349, in load_read
File "site-packages\PIL\PngImagePlugin.py", line 92, in read
File "site-packages\PIL\PngImagePlugin.py", line 40, in i32
IndexError: string index out of range
picardo is offline   Reply With Quote
Old 04-21-2010, 04:50 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
is this with all epub files?
kovidgoyal is online now   Reply With Quote
Advert
Old 04-21-2010, 09:00 PM   #3
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
Just the ones I converted from HTML using Calibre.
picardo is offline   Reply With Quote
Old 04-21-2010, 09:03 PM   #4
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
Btw, when I try converting them using Mobipocket Reader, it also fails.
picardo is offline   Reply With Quote
Old 04-21-2010, 09:18 PM   #5
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
Oh, I forgot to mention. When I convert directly from HTML into MOBI--as in when I plug in the device before hitting send to device, which takes them directly from HTML to MOBI--the file that gets sent is full of problems, like you can't go to the next page on some pages and there are many completely blank pages. Things like that. That was my initial reason for converting into EPUB before sending them to the device.
picardo is offline   Reply With Quote
Advert
Old 04-21-2010, 09:38 PM   #6
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
One last update: I kept it running to see if it could work eventually. After 10 minutes, it finally sent the book to the device. Maybe the size of the book (10MB) has something to do with the long delay, but it had failed the last time I tried this. Ther are still problems with the output, as I mentioned above, "next page" button is not working at some places, etc.
picardo is offline   Reply With Quote
Old 04-22-2010, 01:09 AM   #7
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
I think it's the size or the number of the images in this file causing the issue. I cropped out a number of images and it went through eventually.
picardo is offline   Reply With Quote
Old 04-22-2010, 05:13 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, the error indicates aproblem with one of the PNG files in your book.
kovidgoyal is online now   Reply With Quote
Old 04-22-2010, 09:45 AM   #9
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
Quote:
Originally Posted by kovidgoyal View Post
Yes, the error indicates aproblem with one of the PNG files in your book.

You know what? I think one of the images has the wrong extension. I started opening all the images after reading your reply, and IrfanView told me one of the JPGs was supposed to be a PNG.
picardo is offline   Reply With Quote
Reply

Tags
epub, mobi


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
error converting mobi to epub babyd Calibre 2 10-06-2010 01:32 PM
Error converting from epub to mobi kornhill Calibre 5 06-28-2010 09:27 PM
Error when converting from mobi to epub daveldhu Calibre 1 06-05-2010 11:38 AM
ERROR when converting mobi to epub? help! (new at this) dalpod Calibre 2 04-14-2010 12:52 PM
Error when converting to Mobi and Epub Amalthia Calibre 3 05-11-2009 04:18 AM


All times are GMT -4. The time now is 02:52 AM.


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