fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
179 stars 24 forks source link

Can't access to any pdf that creates a cloze card #135

Closed cocowash closed 4 years ago

cocowash commented 4 years ago

The title is self-explanatory, here is the debug info.

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-09-21 17:07:20

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 31, in cmd File "aqt\webview.py", line 97, in _onCmd File "aqt\webview.py", line 494, in _onBridgeCmd File "aqt\gui_hooks.py", line 1789, in __call__ File "C:\Users\username\AppData\Roaming\Anki2\addons21\1781298089\src\command_parsing.py", line 577, in expanded_on_bridge_cmd index.ui.reading_modal.display(id) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1781298089\src\internals.py", line 54, in _check_ix return fn(*args, **kwargs) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1781298089\src\web\reading_modal.py", line 119, in display html = self.html() File "C:\Users\username\AppData\Roaming\Anki2\addons21\1781298089\src\web\reading_modal.py", line 419, in html due_today = mw.col.find_cards("(is:due or is:new or (prop:due=1 and is:review)) and (%s)" % " or ".join([f"nid:{nid}" for nid in last_linked])) AttributeError: '_Collection' object has no attribute 'find_cards'

any idea what is causing it to crash?

fonol commented 4 years ago

Thanks for the report, I uploaded a fix.

cocowash commented 4 years ago

Since the last update all seems to work properly, thanks for fixing it.