You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Closed database checks still not right. I'm still getting a use after close error:
Traceback (most recent call last):
File "C:\Users\kiera\git\anki\qt\aqt\webview.py", line 50, in cmd
return json.dumps(self.onCmd(str))
File "C:\Users\kiera\git\anki\qt\aqt\webview.py", line 157, in _onCmd
return self._onBridgeCmd(str)
File "C:\Users\kiera\git\anki\qt\aqt\webview.py", line 686, in _onBridgeCmd
return self.onBridgeCmd(cmd)
File "C:\Users\kiera\git\anki\qt\aqt\editor.py", line 425, in onBridgeCmd
if gui_hooks.editor_did_unfocus_field(False, self.note, ord):
File "C:\Users\kiera\git\anki\out/qt\_aqt\hooks.py", line 2548, in __call__
changed = anki.hooks.runFilter(
File "C:\Users\kiera\git\anki\pylib\anki\hooks.py", line 45, in runFilter
arg = func(arg, *args)
File "C:\Users\kiera\coding\anki-chinese-support-3\addons21\anki-chinese-support-3\chinese\edit.py", line 122, in onFocusLost
if not update_fields(note, field, allFields):
File "C:\Users\kiera\coding\anki-chinese-support-3\addons21\anki-chinese-support-3\chinese\behavior.py", line 346, in update_fields
fill_alt(hanzi, copy)
File "C:\Users\kiera\coding\anki-chinese-support-3\addons21\anki-chinese-support-3\chinese\behavior.py", line 99, in fill_alt
alts = dictionary.get_variants(hanzi)
File "C:\Users\kiera\coding\anki-chinese-support-3\addons21\anki-chinese-support-3\chinese\database.py", line 246, in get_variants
self.c.execute(
sqlite3.ProgrammingError: Cannot operate on a closed database.
To Reproduce
open add new card window
fill in hanzi field
click close on main window
trigger fill with any sort of event on the add window
see error above
Probably because the handler for closing is being called even though the add window is still open. Might be an Anki issue tbh but we can at least account for it.
The text was updated successfully, but these errors were encountered:
Yeah it seems like the profile_will_close hooks is triggered when the main window is closed, which leads to issues when other windows are open. I don't think that is intended behaviour.
Describe the bug
Closed database checks still not right. I'm still getting a use after close error:
To Reproduce
Probably because the handler for closing is being called even though the add window is still open. Might be an Anki issue tbh but we can at least account for it.
The text was updated successfully, but these errors were encountered: