xchewtoyx / calibre-comicvine

Comicvine calibre metadata source for comic-books and Graphic Novels
MIT License
31 stars 11 forks source link

No module named PyQt4.Qt #6

Open OgamiDaigoro opened 8 years ago

OgamiDaigoro commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

MikeyTsi commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

From: Matthias Gattermeier [mailto:notifications@github.com] Sent: Friday, August 12, 2016 07:54 To: xchewtoyx/calibre-comicvine calibre-comicvine@noreply.github.com Cc: MikeyTsi mikeytsi@gmail.com; Comment comment@noreply.github.com 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 https://github.com/xchewtoyx/calibre-comicvine/issues/6#issuecomment-239468156 , or mute the thread https://github.com/notifications/unsubscribe-auth/AHXg2xkz3dfl8X_7NBoKX3uqd_8ZyQjRks5qfIjvgaJpZM4H4wNQ . https://github.com/notifications/beacon/AHXg25EPccRedA6ngk27o6LWhw90ietlks5qfIjvgaJpZM4H4wNQ.gif