sth2018 / FastWordQuery

Query words definitions or examples etc. from local or web dictionaries to fill into Anki cards.
https://ankiweb.net/shared/info/1807206748
GNU General Public License v3.0
270 stars 85 forks source link

bing 查询examples字段,勾选cloze选项,查询时报错 #104

Open Jhering opened 5 years ago

Jhering commented 5 years ago

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-ons section of our support site. Debug info: Anki 2.1.5 Python 3.6.1 Qt 5.9.2 PyQt 5.9 Platform: Windows 10 Flags: frz=True ao=True sv=1

Caught exception: File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\common.py", line 76, in action.triggered.connect(lambda: query_from_browser(browser)) File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\query__init__.py", line 55, in query_from_browser query_from_editor_fields(browser.editor) File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\query__init.py", line 90, in query_from_editor_fields query_all([editor.note], flush, fields) File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\query\init__.py", line 113, in query_all work_manager.start() File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\query\worker.py", line 116, in start worker.run() File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\query\worker.py", line 63, in run results, success_num, missed_css = query_flds(note, self.manager.query_fields) File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\query\common.py", line 245, in query_flds qr['result'] = cloze_deletion(qr['result'], word) File "C:\Users\liwen\AppData\Roaming\Anki2\addons21\1807206748\query\common.py", line 292, in cloze_deletion result = result[:s+offset] + (config.cloze_str % w) + result[e+offset:] <class 'TypeError'>: not all arguments converted during string formatting

但是如果不勾选cloze选项的话,查询结果中的该单词就无法高亮。 郁闷。

Jhering commented 5 years ago

已经解决。