Calibre
口徑不要從epub轉換為mobi
Calibre 沒有將我的 Epub Books 轉換為 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 版
官方修復已發布,而且很簡單:https ://github.com/kovidgoyal/calibre/commit/72d47ba9377d70e786bf3d93b323544188c894bd
我根據該差異在我的系統上編輯了我的 /usr/lib/calibre/calibre/gui2/widgets.py,一切正常。
臨時解決方法是更改 /usr/lib/calibre/calibre/gui2/widgets.py 的第 298 行(並刪除 widgets.py
$$ co $$) 到:
self._pixmap = QPixmap(self.grab())
嘗試打開對話框時,這仍然會導致錯誤消息,但是在消息之後,視窗會打開,並且編輯元數據和轉換電子書都對我有用。