|
|
#1 |
|
Junior Member
![]() 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
|
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,697
Karma: 28549304
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. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2012
Device: Kindle
|
Thank you for your help Kovidgoyal
|
|
|
|
![]() |
| Tags |
| import error |
|
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 04:00 PM |
| Error on import | Amalthia | Calibre | 8 | 03-23-2010 04:04 PM |
| 0.6.14 - error on import | JohnDoe | Calibre | 7 | 10-01-2009 07:59 AM |
| Unable to import large db keep getting an error | Student1 | Calibre | 20 | 02-27-2009 12:02 AM |
| 04.95 crashes with import-error (OS X 10.5.5) | embe71 | Calibre | 0 | 10-11-2008 10:51 AM |