Calibre 没有将我的 Epub 图书转换为 Mobi。它因以下错误而中止:
TypeError: QPixmap(): argument 1 has unexpected type 'ImageView'
这是完整的错误消息:
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'
我正在使用 Archlinux 和 Calibre 版本 2.20
答案1
官方已经修复了,而且很简单:https://github.com/kovidgoyal/calibre/commit/72d47ba9377d70e786bf3d93b323544188c894bd
我根据该差异在系统上编辑了 /usr/lib/calibre/calibre/gui2/widgets.py ,一切正常。
答案2
临时解决方法是将 /usr/lib/calibre/calibre/gui2/widgets.py (并删除 widgets.py[co])的第 298 行更改为:
self._pixmap = QPixmap(self.grab())
当尝试打开对话框时,这仍然会导致错误消息,但在消息出现后,窗口将打开,并且编辑元数据和转换电子书都对我有用。