![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Run from Source on Windows?
I am trying to run Calibre from source on Windows (under Eclipse). When I choose run on (for instance) server.py, I get an error that states:
Code:
Traceback (most recent call last): File "C:\calibre\src\calibre\library\server.py", line 17, in <module> from PyQt4.Qt import QImage, QApplication, QByteArray, Qt, QBuffer ImportError: cannot import name QImage I want to be able to run from source as it should make it easier to investigate why some dialogs are not disappearing as they should on completing their action. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Can you run it from a console? And the dialog not disappearing problem should be fixed now.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
Code:
python server.py I still have the problem with the "Add Books" dialog not disappearing even in 4.129. I thought if I could get it running from Calibre source I could start investigating why. This is on several machines - the only common factor being they are all running XP Pro SP3. Having said that another common factor is that the Calibre library is on a network share on a NAS device. The Add books dialog not disappearing happens nearly all the time. I also occasionally get the Edit Metadata dialog not disappearing when it should, although that is much rarer. Last edited by itimpi; 01-21-2009 at 07:38 PM. |
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In that case, your PyQt installation seems to not be working. You can test it with
python -c "from PyQt4.Qt import QImage" Did you install it from source or using the binary? |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm guessing that c:\Python26\Lib\site-packages\PyQt exists and contains the requisite .pyd files?
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
That folder exists.
It contains a Qt.pyd file, which is where I assummed those imports are meant to come from? |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If that's all it has the modules are missing. Qt.pyd is just a convenience wrapper. THere should be QtGui.pyd and QtCore.pyd at a minimum. Here is what my folder contains
Code:
Qt.pyd QtCore.pyd QtGui.pyd QtNetwork.pyd QtSvg.pyd QtWebKit.pyd __init__.py __init__.pyc pyqtconfig.py pyqtconfig.pyc uic |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
All those files (and more) are present.
If you are reasonably sure it is the PyQt package that is at fault I can remove and rebuild. Last edited by itimpi; 01-22-2009 at 12:46 AM. |
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah if the plain python command is failing then that's the most likely cause
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I've rebuilt PyQt4 and that appears to have fixed the problem. Not sure why as I simply repeated what I previously did when I built it. Guess the reason does not matter as long as it now works!
|
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Most likely it was a pyqt that was compiled for an incompatible python/qt version
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Possibly - although I had compiled from source!
The only thing I did this time that might have been different was delete the source folder and re-create it from the downloaded zip. I guess that there must have been some debris left behind from other install attempts? |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Run Calibre as Task in Windows 7 | nchall114 | Calibre | 10 | 04-22-2010 10:29 AM |
Checkout source using windows | howsey | Calibre | 2 | 02-22-2009 02:03 PM |
Installer doesn't run on Windows 7 | drogo | Calibre | 5 | 02-09-2009 08:13 PM |
Can eink devices run Windows Mobile? | da_jane | News | 11 | 10-14-2006 09:34 AM |