1

Calibre did not convert my Epub Books to Mobi. It aborts with this Error:

TypeError: QPixmap(): argument 1 has unexpected type 'ImageView'

This is the full Error Message:

calibre 2.20  isfrozen: False is64bit: True
Linux-3.18.6-1-ARCH-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '3.18.6-1-ARCH', '#1 SMP PREEMPT Sat Feb 7 08:44:05 CET 2015')
Python 2.7.9
Linux: ('', '', '')
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/device.py", line 1257, in dispatch_sync_event
    self.sync_to_device(on_card, delete, fmt)
  File "/usr/lib/calibre/calibre/gui2/device.py", line 1531, in sync_to_device
    self.iactions['Convert Books'].auto_convert(auto, on_card, format)
  File "/usr/lib/calibre/calibre/gui2/actions/convert.py", line 76, in auto_convert
    jobs, changed, bad = convert_single_ebook(self.gui, self.gui.library_view.model().db, book_ids, True, format)
  File "/usr/lib/calibre/calibre/gui2/tools.py", line 41, in convert_single_ebook
    d = SingleConfig(parent, db, book_id, None, out_format)
  File "/usr/lib/calibre/calibre/gui2/convert/single.py", line 151, in __init__
    self.setup_pipeline()
  File "/usr/lib/calibre/calibre/gui2/convert/single.py", line 201, in setup_pipeline
    self.mw = widget_factory(MetadataWidget)
  File "/usr/lib/calibre/calibre/gui2/convert/single.py", line 199, in widget_factory
    self.plumber.get_option_help, self.db, self.book_id)
  File "/usr/lib/calibre/calibre/gui2/convert/metadata.py", line 55, in __init__
    Widget.__init__(self, parent, ['prefer_metadata_cover'])
  File "/usr/lib/calibre/calibre/gui2/convert/__init__.py", line 62, in __init__
    self.setupUi(self)
  File "/usr/lib/calibre/calibre/gui2/convert/metadata_ui.py", line 51, in setupUi
    self.cover = ImageView(self.groupBox_4)
  File "/usr/lib/calibre/calibre/gui2/widgets.py", line 298, in __init__
    self._pixmap = QPixmap(self)
TypeError: QPixmap(): argument 1 has unexpected type 'ImageView'

I'm using Archlinux and Calibre Version 2.20

1

The official fix is in, and it is trivial: https://github.com/kovidgoyal/calibre/commit/72d47ba9377d70e786bf3d93b323544188c894bd

I edited my /usr/lib/calibre/calibre/gui2/widgets.py on my system according to that diff, and everything worked.

0

A temporary workaround is to change line 298 of /usr/lib/calibre/calibre/gui2/widgets.py (and deleting widgets.py[co]) to:

self._pixmap = QPixmap(self.grab())

This still results in an error message when attempting to open the dialog, but after the message, the window opens and both editing metadata and converting ebooks work for me.

  • Perhaps mention the from as well as the to line? – Faheem Mitha Mar 5 '15 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.