Since Qt is supposed to be a shortcut module that contains the entire PyQt namespace, this is a bug in ubuntu. You should open a ticket. I'll make that change in the code though.
Quote:
Originally Posted by salty-horse
Ubuntu 8.10 Seems to have the QWebPage class in the QtWebKit module instead of Qt, as seen in calibre's source.
I have made this change to the source, and now I get no errors, and ePub cover thumbnails display fine in the GUI:
Code:
=== modified file 'src/calibre/ebooks/metadata/epub.py'
--- src/calibre/ebooks/metadata/epub.py 2008-10-11 00:44:56 +0000
+++ src/calibre/ebooks/metadata/epub.py 2008-10-14 12:53:27 +0000
@@ -10,8 +10,12 @@
from contextlib import closing
from ctypes import c_long, byref
-from PyQt4.Qt import QWebPage, QUrl, QEventLoop, QSize, QByteArray, QBuffer, \
+from PyQt4.Qt import QUrl, QEventLoop, QSize, QByteArray, QBuffer, \
SIGNAL, QPainter, QImage, QObject, QApplication
+try:
+ from PyQt4.Qt import QWebPage
+except ImportError:
+ from PyQt4.QtWebKit import QWebPage
from calibre.utils.PythonMagickWand import ImageMagick, NewMagickWand, MagickGetImageBlob, \
MagickReadImageBlob, MagickTrimImage, MagickSetFormat
|