Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2014, 08:05 PM   #1
Exml
Junior Member
Exml began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2012
Device: Kindle
QtXml import error

Hi,

I'm trying (programming is not my forte ) to adapt the Calibre eBook Editor to my needs, so far I've modified the pretty printing routine, I 've added "support" for Smil files, by that I mean that there is a SMIL folder created in the tree view and those Smil files can be loaded in the editor to be modified.

My problem is the following: I'm trying to import QtXml (from PyQt4.Qt import QtXml) but an error is thrown (ImportError: cannot import name Qtxml) BUT I can see it in the DLLs folder (I'm under Windows).

Could anyone explain to me what is the problem and how to make the Calibre environment aware of the presence of QtXml or any other Python lib/module I have installed on my system for that matter?

I hope you can help me and thank you for this great tool you've created for us it's really helpful
Exml is offline   Reply With Quote
Old 04-05-2014, 11:32 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: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cannot import QtXml because the PyQt4 QtXml module is not included with calibre. If you want to parse XML dont use QtXml, use lxml, which is much, much better.

And if you want to add your own python modules, just add the import path to sys.path, like you would for any normal python interpreter.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-06-2014, 12:56 AM   #3
Exml
Junior Member
Exml began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2012
Device: Kindle
Thank you for your help Kovidgoyal
Exml is offline   Reply With Quote
Reply

Tags
import error


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import failed Error:404 when attempting to import from Calibre to Stanza dvond Apple Devices 0 05-13-2011 03:00 PM
Error on import Amalthia Calibre 8 03-23-2010 03:04 PM
0.6.14 - error on import JohnDoe Calibre 7 10-01-2009 06:59 AM
Unable to import large db keep getting an error Student1 Calibre 20 02-26-2009 11:02 PM
04.95 crashes with import-error (OS X 10.5.5) embe71 Calibre 0 10-11-2008 09:51 AM


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


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