Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-13-2010, 09:57 AM   #1
ivanm
e^bored
ivanm began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura HD, BeBook Neo
Cannot convert .lit to .epub

I tried to download the .lit file for Wizardry Compiled from http://www.baen.com/library/ (since there's no .epub and the FAQ says Calibre prefers .lit over .prc for conversion), but whenever Calibre tries to convert it to put it on my reader it comes up with this error:

Code:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 320, in get_file_type_metadata
    mi = plugin.get_metadata(stream, ftype.lower().strip())
  File "/usr/lib/calibre/calibre/customize/builtins.py", line 136, in get_metadata
    return get_quick_metadata(stream)
  File "/usr/lib/calibre/calibre/ebooks/metadata/epub.py", line 182, in get_quick_metadata
    return get_metadata(stream, False)
  File "/usr/lib/calibre/calibre/ebooks/metadata/epub.py", line 169, in get_metadata
    reader = OCFZipReader(stream)
  File "/usr/lib/calibre/calibre/ebooks/metadata/epub.py", line 109, in __init__
    raise EPubException("not a ZIP .epub OCF container")
EPubException: not a ZIP .epub OCF container
Segmentation fault
Note also that Calibre couldn't read metada from this file (complained about not being a valid .opf file or something; forgot to save that error).

Also, the ebook viewer within Calibre can read the .lit file perfectly fine, it just doesn't seem to want to convert it.

When I try to convert it to a MOBI, it just spits out a segmentation fault error.
ivanm is offline   Reply With Quote
Old 08-13-2010, 11:31 AM   #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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error is for reading metadata from an epub file, not converting a lit file. Have you by any chance renamed your lit to epub?
kovidgoyal is offline   Reply With Quote
Advert
Old 08-13-2010, 06:52 PM   #3
ivanm
e^bored
ivanm began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura HD, BeBook Neo
Nope, I haven't; note also that lit2epub from http://sourceforge.net/projects/ebook-tools/ works, but doesn't produce as nice an epub file as Calibre used to.

I've also tried this on some other lit and mobi files I have; Calibre can't convert them either.
ivanm is offline   Reply With Quote
Old 08-13-2010, 06:58 PM   #4
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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Then you have a corrupted calibre install, converting lit files works just fine.

Looking at your error trace, I see you have an source/distro install. Uninstall it and install the binary.
kovidgoyal is offline   Reply With Quote
Old 08-13-2010, 07:50 PM   #5
ivanm
e^bored
ivanm began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura HD, BeBook Neo
*sigh* that seemed to work, but I'd much rather use my distro package (for the ability to uninstall, etc.) rather than a pre-compiled binary.

I suspect it may be a dependency problem; is it possible to find out which versions of python, etc. you used for the binary?
ivanm is offline   Reply With Quote
Advert
Old 08-14-2010, 01:52 AM   #6
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
There are a very large number of dependencies in calibre all of which have to be at the right minimum level (not just python itself), so getting these right can be a big issue if you use the source install. However if you use the binary package, then all these are included and installed in the calibre folder. Removing calibre simply involves deleting the calibre install folder so automated uninstall is not really an issue.
itimpi is offline   Reply With Quote
Old 08-14-2010, 06:45 AM   #7
ivanm
e^bored
ivanm began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura HD, BeBook Neo
Well, my system satisfies the minimum dependencies specified here: http://calibre-ebook.com/download_linux

More specifically (required version in parentheses):
  • Python: 2.6.5 (>=2.6)
  • Python Imaging Library: 1.1.7 (>=1.1.6)
  • Qt libraries: 4.6.3 (>=4.6)
  • PyQt: 4.7.4 (>=4.7.0)
  • python-mechanize: 0.2.2 (>=0.1.11)
  • ImageMagick: 6.6.3.0 (>=6.5.9)
  • xdg-utils: 1.0.2 (>=1.0.2)
  • lxml: 2.2.7 (>=2.2.1)
  • python-dateutil: 1.5 (>=1.4.1)
  • cssutils: 0.9.7b3 (>= 0.9.7a3)
  • BeautifulSoup: both 3.0.8.1 and 3.1.0.1 [not sure which is used] (>=3.0.5)
  • dnspython: 1.8.0 (>=1.6.0)
  • poppler: 0.14.1 (>=0.12.0)
  • podofo: 0.8.1 (>=0.7)
  • libwmf: 0.2.8.4 (>=0.2.8)
  • chmlib: 0.40 (>=0.40)

As such, the versions I have match the required specification. It is possible that one of the versions I have is _too_ new, but in that case Calibre should specify upper bounds and not just lower bounds.
ivanm is offline   Reply With Quote
Old 08-14-2010, 08:48 AM   #8
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by ivanm View Post
As such, the versions I have match the required specification. It is possible that one of the versions I have is _too_ new, but in that case Calibre should specify upper bounds and not just lower bounds.
As I understand things, the various linux distributions are not put together by Kovid and thus are out of his hands. Since you have met all the Dependencies you might want to consider just running it from source.
DoctorOhh is offline   Reply With Quote
Old 08-14-2010, 04:58 PM   #9
unkilbeeg
Enthusiast
unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!unkilbeeg My eyes! My eyes! The light is just too bright!
 
unkilbeeg's Avatar
 
Posts: 49
Karma: 80904
Join Date: Nov 2006
Location: Bakersfield, CA
Device: Sony PRS-500/Astak EZReader 5"/PocketBook 360/Kindle
Quote:
Originally Posted by ivanm View Post
As such, the versions I have match the required specification. It is possible that one of the versions I have is _too_ new, but in that case Calibre should specify upper bounds and not just lower bounds.
Are you running Gentoo? I'm having this problem with both LRF and LIT files. Calibre displays them perfectly, but goes <poof> and vanishes like a soap bubble when I try to convert.

Maybe I need to try a binary install as well.
unkilbeeg is offline   Reply With Quote
Old 08-14-2010, 05:22 PM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ivanm View Post
As such, the versions I have match the required specification. It is possible that one of the versions I have is _too_ new, but in that case Calibre should specify upper bounds and not just lower bounds.
My guess is that specifying upper bounds won't happen. The time required to validate calibre every time some library changes is very large. Such validation would spend Kovid's time checking for things of interest to a very small community, taking that time away from making and testing changes that are of interest to the majority of users.

I think that the best we can ask for is that Kovid provide specifications for what works for him, and for what is in the binary releases. Of course, if someone else is interested in testing newer releases of libraries, I am sure that Kovid would be happy to publish the results.
chaley is offline   Reply With Quote
Old 08-15-2010, 03:43 AM   #11
ivanm
e^bored
ivanm began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura HD, BeBook Neo
Quote:
Originally Posted by unkilbeeg View Post
Are you running Gentoo? I'm having this problem with both LRF and LIT files.
Yes, I am. Have you tried converting any mobi files?
ivanm is offline   Reply With Quote
Old 08-15-2010, 04:46 AM   #12
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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's not your library dependencies, I develop calibre on gentoo ~amd64. It's most likely the util-linux - pyqt4 incompatibility bug in gentoo. Search teh gentoo bug tracker for it.
kovidgoyal is offline   Reply With Quote
Old 08-15-2010, 04:55 AM   #13
ivanm
e^bored
ivanm began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura HD, BeBook Neo
*sigh* I take it we should downgrade util-linux then?

So much for that work-around that the ebuild contains...
ivanm is offline   Reply With Quote
Old 08-15-2010, 05:00 AM   #14
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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The work around just allows calibre to be installed.
kovidgoyal is offline   Reply With Quote
Old 08-18-2010, 06:32 AM   #15
ivanm
e^bored
ivanm began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura HD, BeBook Neo
And yes, that was it; downgrading util-linux let it work again.

Whose fault is it here? PyQt for not working with the latest version of util-linux nicely?
ivanm is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
best tool to convert to Lit.? bbudd Reading and Management 8 03-27-2010 09:49 AM
Convert .lit to .prc ChrisM12743 Gen3 Developer's Corner 47 08-18-2008 03:17 PM
problem with convert lit chilla Sony Reader 3 12-28-2007 02:29 PM


All times are GMT -4. The time now is 03:35 AM.


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