FastWordQuery icon indicating copy to clipboard operation
FastWordQuery copied to clipboard

每当我配置好选项,查询的时候他就报错,然后重启又要重新配置,保存不了之前的配置。

Open xuyaocrazy opened this issue 4 years ago • 2 comments

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site. Debug info: Anki 2.1.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-04-03 21:12:19

Caught exception: Traceback (most recent call last): File "C:\Users\xdyua\AppData\Roaming\Anki2\addons21\1807206748\common.py", line 259, in c['name'], lambda i=c['def']: query_from_editor_hook(i)) File "C:\Users\xdyua\AppData\Roaming\Anki2\addons21\1807206748\common.py", line 249, in query_from_editor_hook set_options_def(current_model_id, i) File "C:\Users\xdyua\AppData\Roaming\Anki2\addons21\1807206748\common.py", line 53, in set_options_def config.update(data) File "C:\Users\xdyua\AppData\Roaming\Anki2\addons21\1807206748\context.py", line 61, in update json.dump( File "json_init_.py", line 179, in dump File "json\encoder.py", line 431, in _iterencode File "json\encoder.py", line 353, in _iterencode_dict TypeError: '<' not supported between instances of 'int' and 'str'

xuyaocrazy avatar Apr 04 '20 05:04 xuyaocrazy

经过我多次尝试,发现只要添加了另外一个配置,在查询的时候他就报错。 默认一个配置文件查询的时候不会报错。 希望作者有时间可以修复这个问题

xuyaocrazy avatar Apr 04 '20 06:04 xuyaocrazy

in the plugin path like this "C:\Users\ryan_\AppData\Roaming\Anki2\addons21\1807206748" to edit context.py file

from with open(self.path, 'w', encoding='utf-8') as f: json.dump( self.data, f, indent=4, sort_keys=True, ensure_ascii=False) f.close() runHook('config.update')

To with open(self.path, 'w', encoding='utf-8') as f: json.dump( self.data, f, indent=4, sort_keys=False, ensure_ascii=False) f.close() runHook('config.update')

Ryan-tw-Hans avatar Nov 15 '20 12:11 Ryan-tw-Hans