Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法添加插件到calibre5.1 #7

Open
Qinolion opened this issue Oct 5, 2020 · 2 comments
Open

无法添加插件到calibre5.1 #7

Qinolion opened this issue Oct 5, 2020 · 2 comments

Comments

@Qinolion
Copy link

Qinolion commented Oct 5, 2020

calibre, version 5.1.0
错误: 未处理的异常: ImportError:cannot import name 'urlencode' from 'urllib' (C:\Program Files\Calibre2\app\pylib.zip\urllib_init_.pyc)

calibre 5.1 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', 'SP0', 'Multiprocessor Free')
Interface language: zh_CN
Successfully initialized third party plugins: Embed Comic Metadata (1, 5, 0) && GetFileName (0, 1, 0)
Traceback (most recent call last):
File "site-packages\calibre\gui2\preferences\plugins.py", line 317, in add_plugin
File "site-packages\calibre\customize\ui.py", line 472, in add_plugin
File "site-packages\calibre\customize\ui.py", line 61, in load_plugin
File "site-packages\calibre\customize\zipplugin.py", line 202, in load
File "importlib_init_.py", line 127, in import_module
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in load_backward_compatible
File "site-packages\calibre\customize\zipplugin.py", line 184, in load_module
File "calibre_plugins.dummy1.init", line 16, in
ImportError: cannot import name 'urlencode' from 'urllib' (C:\Program Files\Calibre2\app\pylib.zip\urllib_init
.pyc)

@Qinolion
Copy link
Author

Qinolion commented Oct 5, 2020

因为 from urllib 是python2的导入方式

在python3中将 from urllib import urlencode 中的 “urllib” 改为 “urllib.parse” 就可以了

@Qinolion
Copy link
Author

Qinolion commented Oct 5, 2020

大佬更新一下吧

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

No branches or pull requests

1 participant