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
I developed a feature to execute a background task after sync. But it sometime pops up an error when user is closing the collection.
The error:
Anki 23.12.1 (1a1d4d5) (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-14.3.1-arm64-arm-64bit
Traceback (most recent call last):
File "aqt.taskman", line 142, in _on_closures_pending
File "aqt.taskman", line 86, in
File "/Users/jspear/Library/Application Support/Anki2/addons21/759844606/schedule/reschedule.py", line 171, in on_done
mw.reset()
File "aqt.main", line 851, in reset
File "aqt.main", line 803, in _synthesize_op_did_execute_from_reset
File "_aqt.hooks", line 3840, in call
File "aqt.deckchooser", line 120, in on_operation_did_execute
File "aqt.deckchooser", line 82, in _update_button_label
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted
A quick and dirty fix would be to check for sip.isdeleted() here. DeckChooser has a cleanup() method that appears not to be called in this case. The inconsistent destruction/garbage collection of the C++ and Python side is a bit of a mess and mostly our fault, but I'm not sure it's worth spending a lot of effort trying to fix it, if a web/JS UI is the future.
The text was updated successfully, but these errors were encountered:
A quick and dirty fix would be to check for sip.isdeleted() here. DeckChooser has a cleanup() method that appears not to be called in this case. The inconsistent destruction/garbage collection of the C++ and Python side is a bit of a mess and mostly our fault, but I'm not sure it's worth spending a lot of effort trying to fix it, if a web/JS UI is the future.
The text was updated successfully, but these errors were encountered: