Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2014, 09:25 PM   #1
twotails
Junior Member
twotails began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2013
Device: Kobo Glo HD
XML error when opening one particular book in Linux

I have a strange issue with a certain ebook. When I try to read it in Calibre, I get an Invalid Predicate error with the following output:

Code:
calibre, version 1.23.0
ERROR: Could not open ebook: Invalid predicate

Traceback (most recent call last):
  File "/usr/lib64/calibre/calibre/gui2/viewer/main.py", line 40, in run
    Thread.run(self)
  File "/usr/lib64/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/calibre/calibre/ebooks/oeb/iterator/book.py", line 99, in __enter__
    {}, self.base)
  File "/usr/lib64/calibre/calibre/customize/conversion.py", line 241, in __call__
    log, accelerators)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/epub_input.py", line 208, in convert
    if not self.process_encryption(encfile, opf, log):
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/epub_input.py", line 39, in process_encryption
    idpf_key = opf.unique_identifier
  File "/usr/lib64/calibre/calibre/ebooks/metadata/opf2.py", line 1113, in unique_identifier
    matches = self.root.xpath('//*[@id=%r]'%uuid_elem)
  File "lxml.etree.pyx", line 1478, in lxml.etree._Element.xpath (src/lxml/lxml.etree.c:49895)
  File "xpath.pxi", line 318, in lxml.etree.XPathElementEvaluator.__call__ (src/lxml/lxml.etree.c:144232)
  File "xpath.pxi", line 238, in lxml.etree._XPathEvaluatorBase._handle_result (src/lxml/lxml.etree.c:143240)
  File "xpath.pxi", line 223, in lxml.etree._XPathEvaluatorBase._raise_eval_error (src/lxml/lxml.etree.c:143048)
XPathEvalError: Invalid predicate
This appears to be only on Linux (and possibly only on my distro, I don't know), since I've had friends on Windows test it out and it opens in Calibre for them. If I open it in ADE under Wine, the book opens but it says that the book contains errors and may not display properly (it looks fine to me though).

Because it gives an error in ADE I assume it has something to do with the book's formatting. I've never seen this error appear with another book, and Google doesn't seem to show anyone else with the error either.

I use Slackware Linux and Calibre is built from source, but there are two different build scripts for Calibre (from different sources) and the same error appears in both. Presumably it has something to do with lxml, but I really can't say for sure.

The problem has happened in every Calibre version I've tried it in, from the current build to at least five or six versions ago.

I would share the book for others to test, but it being a copyrighted ebook I don't know if that would be allowed here on the forum. The book came from an official source so I don't think it's a case of anyone tampering with the book.

Anyone have any thoughts on what might be causing this, or how to fix it? The error is preventing me from sending it to my reader, which is a little annoying.

Last edited by twotails; 02-11-2014 at 09:34 PM. Reason: fixing a typo
twotails is offline   Reply With Quote
Old 02-11-2014, 09:37 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@twotails - If you report the problem here ==>> https://bugs.launchpad.net/calibre with copyrighted attachment and mark the post 'private' then 'joe blow public' wont be able to see it.

BR
BetterRed is offline   Reply With Quote
Advert
Old 02-11-2014, 09:49 PM   #3
twotails
Junior Member
twotails began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2013
Device: Kobo Glo HD
Thanks, I'm filing a bug report with this information right now.
twotails is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Container.xml File Error jackibar Sigil 17 06-17-2017 02:50 PM
Oxygen XML Editor - Image error Kayto ePub 14 04-17-2013 11:50 AM
XML error dialog in code view davidfor Sigil 3 01-30-2012 08:29 AM
PRS-650 Exclamation Point error opening epub book TimeTraveler Sony Reader 3 02-15-2011 10:38 PM
Random XML corrupted error siulayhumga Calibre 0 06-16-2009 05:37 PM


All times are GMT -4. The time now is 05:58 PM.


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