Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

No module named PyQt4.Qt #6

Open
OgamiDaigoro opened this issue Mar 25, 2016 · 8 comments · May be fixed by #7
Open

No module named PyQt4.Qt #6

OgamiDaigoro opened this issue Mar 25, 2016 · 8 comments · May be fixed by #7

Comments

@OgamiDaigoro
Copy link

Calibre 2.53
Linux Mint 17.3

I assume it's not compatible with the latest Calibre version. are there any ways around this or does anyone know the latest release this plugin works with?

It's a fresh install of Calibre and no other plugins have been installed. I'm a complete newbe so any help would be appreciated.

$ calibre-customize -a Comicvine.zip
Traceback (most recent call last):
File "site.py", line 66, in main
File "site-packages/calibre/customize/ui.py", line 677, in main
File "site-packages/calibre/customize/ui.py", line 397, in add_plugin
File "site-packages/calibre/customize/ui.py", line 54, in load_plugin
File "site-packages/calibre/customize/zipplugin.py", line 197, in load
File "importlib/init.py", line 37, in import_module
File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
File "calibre_plugins.comicvine.init", line 4, in
File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
File "calibre_plugins.comicvine.source", line 17, in
File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
File "calibre_plugins.comicvine.config", line 6, in
ImportError: No module named PyQt4.Qt

@MikeyTsi
Copy link

I was seeing this too, but it went away and I was able to install the plugin after installing the usual plugins I use for book management. I guess one of them is installing this dependency?

@harvimt
Copy link

harvimt commented May 8, 2016

Calibre switched from PyQt4 to PyQt5 awhile ago. My guess would be the plugin needs to be updated. (change PyQt4 to PyQt5)

here: https://github.com/xchewtoyx/calibre-comicvine/blob/master/config.py#L6

@harvimt
Copy link

harvimt commented May 8, 2016

I fixed it in my fork, but now I'm getting:

calibre, version 2.56.0
ERROR: Unhandled exception: <b>ImportError</b>:cannot import name Comicvine

calibre 2.56 [64bit]  embedded-python: True is64bit: True
Windows-8-6.2.9200 Windows ('64bit', 'WindowsPE')
('Windows', '8', '6.2.9200')
Python 2.7.9
Windows: ('8', '6.2.9200', '', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && FanFicFare
Traceback (most recent call last):
  File "site-packages\calibre\gui2\preferences\plugins.py", line 316, in add_plugin
  File "site-packages\calibre\customize\ui.py", line 415, in add_plugin
  File "site-packages\calibre\customize\ui.py", line 55, in load_plugin
  File "site-packages\calibre\customize\zipplugin.py", line 195, in load
  File "site-packages\calibre\customize\zipplugin.py", line 179, in load_module
  File "calibre_plugins.comicvine.__init__", line 4, in <module>
ImportError: cannot import name Comicvine

@harvimt
Copy link

harvimt commented May 8, 2016

Huh. I was able to install it with calibre-customize.exe -a Comicvine.zip, but not through the UI.

@harvimt harvimt linked a pull request May 8, 2016 that will close this issue
@MikeyTsi
Copy link

MikeyTsi commented May 9, 2016

There haven't been updates to this in over a year, it's probably at a point where someone else may need to take up maintenance.

@jlsidoti
Copy link

Open the file config.py in a text editor and change line 5 from:
from PyQt4.Qt import QWidget, QGridLayout, QLabel, QLineEdit
to:
from PyQt5.Qt import QWidget, QGridLayout, QLabel, QLineEdit

Then re-bundle the plugin zip file and install using the original instructions. Worked for me.

@Gattermeier
Copy link

When I try this and re-zip the folder and attempt to install the plugin I get the error:
It does not contain a top-level __init__.py file

@MikeyTsi
Copy link

So, make sure it contains a top-level init.py file. You probably have it in a sub-directory.

From: Matthias Gattermeier [mailto:[email protected]]
Sent: Friday, August 12, 2016 07:54
To: xchewtoyx/calibre-comicvine [email protected]
Cc: MikeyTsi [email protected]; Comment [email protected]
Subject: Re: [xchewtoyx/calibre-comicvine] No module named PyQt4.Qt (#6)

When I try this and re-zip the folder and attempt to install the plugin I get the error:
It does not contain a top-level init.py file


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #6 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AHXg2xkz3dfl8X_7NBoKX3uqd_8ZyQjRks5qfIjvgaJpZM4H4wNQ . https://github.com/notifications/beacon/AHXg25EPccRedA6ngk27o6LWhw90ietlks5qfIjvgaJpZM4H4wNQ.gif

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants