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

Deleting PDFs from Queue Manager raises error #178

Closed tardiggerAde closed 3 years ago

tardiggerAde commented 3 years ago

What I did

Error message:

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.36 (c505894b) Python 3.8.1 Qt 5.15.1 PyQt 5.15.1
Platform: Linux
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-12-09 21:18:37
Add-ons possibly involved: ⁨Searching PDF Reading  Note-Taking in Add Dialog⁩

Caught exception:
Traceback (most recent call last):
  File "/home/adeeb/.local/share/Anki2/addons21/1781298089/src/dialogs/queue_picker.py", line 1223, in del_btn_clicked
    run_hooks("user-note-deleted")
  File "/home/adeeb/.local/share/Anki2/addons21/1781298089/src/hooks.py", line 49, in run_hooks
    fn()
  File "/home/adeeb/.local/share/Anki2/addons21/1781298089/src/__init__.py", line 386, in <lambda>
    add_hook("user-note-deleted", lambda: get_index().ui.sidebar.refresh_tab(1))
  File "/home/adeeb/.local/share/Anki2/addons21/1781298089/src/web/sidebar.py", line 219, in refresh_tab
    self.refresh()
  File "/home/adeeb/.local/share/Anki2/addons21/1781298089/src/web/sidebar.py", line 222, in refresh
    self.display()
  File "/home/adeeb/.local/share/Anki2/addons21/1781298089/src/web/sidebar.py", line 157, in display
    self._editor.web.eval("""(() => {
AttributeError: 'NoneType' object has no attribute 'web'

Additional Info:

Before attempting to delete the note:

add-on should use methods on col.decks, not col.decks.decks dict
add-on should use methods on col.decks, not col.decks.decks dict

Qt warning: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3051, resource id: 16004477, major code: 40 (TranslateCoords), minor code: 0`

After the error message pops up

Qt warning: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3260, resource id: 16005695, major code: 40 (TranslateCoords), minor code: 0 
Qt warning: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3604, resource id: 16002019, major code: 40 (TranslateCoords), minor code: 0
fonol commented 3 years ago

Thanks for the detailed report, a fix is on Ankiweb.

tardiggerAde commented 3 years ago

Installed update, error has vanished completely along with Qt warning messages that appeared along with the error message. Thank you so much!