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

wordquery错误? #89

Open
xxjknk opened this issue Apr 1, 2018 · 1 comment
Open

wordquery错误? #89

xxjknk opened this issue Apr 1, 2018 · 1 comment

Comments

@xxjknk
Copy link

xxjknk commented Apr 1, 2018

Wrong behavior

打开anki出现以下错误
一个插件发生了错误。
请把它报告在插件的论坛上:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "aqt\progress.py", line 69, in handler
File "aqt\main.py", line 110, in setupProfile
File "aqt\main.py", line 244, in loadProfile
File "anki\hooks.py", line 26, in runHook
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wordquery.py", line 31, in start_here
import wquery
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery_init_.py", line 27, in
from .ui import show_options
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\ui.py", line 34, in
from .service import service_manager
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\service_init_.py", line 24, in
service_manager = ServiceManager()
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\service\manager.py", line 35, in init
self.update_services()
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\service\manager.py", line 50, in update_services
self.local_services = self._get_available_local_services()
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\service\manager.py", line 107, in _get_available_local_services
services.add(MdxService(dict_path))
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 279, in init
self.builder.get_header()
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\libs\mdict\mdict_query.py", line 77, in get_header
_()
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\libs\mdict\mdict_query.py", line 54, in _
mdx = MDX(self._mdx_file, only_header=True)
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\libs\mdict\readmdict.py", line 645, in init
MDict.init(self, fname, encoding, passcode, only_header)
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\libs\mdict\readmdict.py", line 102, in init
self.header = self._read_header()
File "C:\Users\xiyufeng\AppData\Roaming\Anki2\addons\wquery\libs\mdict\readmdict.py", line 283, in _read_header
header_text = header_bytes[:-2].decode('utf-16').encode('utf-8')
File "encodings\utf_16.py", line 16, in decode
UnicodeDecodeError: 'utf16' codec can't decode byte 0x0d in position 1268: truncated data

重装插件之后错误仍然存在。看到之前有个人的问题前几行和我一样,下载了这里最新版的wordquery但是仍然不起作用

When it happened

一打开anki就错误了。

Whether it can be reproduced

@xxjknk
Copy link
Author

xxjknk commented Apr 2, 2018

经过多次重装测试之后终于发现是有一本词典的格式可能和wordquery不匹配,从字典文件夹移除之后就好了

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