[Anki 2.1.29 - Win & Mac] AttributeError: 'NoneType' object has no attribute ‚cancel'

Hi Damien,

2 users reported to me that Anki 2.1.29 displays the following error message right after start:


Es ist ein Fehler aufgetreten. Bitte starten Sie Anki neu und halten Sie während des Startvorgangs die Umschalttaste gedrückt, damit Anki die installierten Erweiterungen temporär deaktiviert.

Wenn das Problem nur auftritt, wenn die Erweiterungen aktiviert sind, dann benutzen Sie bitte den Menueintrag Extras > Erweiterungen um die problembehaftete Erweiterung durch selektives Deaktivieren herauszufinden.

Wenn Sie die entsprechende Erweiterung herausgefunden haben, dann bitten wir, dass Sie sich mit einem entsprechenden Problembericht an die Support-Seite für Erweiterungen wenden, damit der Fehler behoben werden kann.


Anki 2.1.29 (bbff62bf) Python 3.8.0 Qt 5.15.0 PyQt 5.15.0
Platform: Mac 10.13.6
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-07-30 12:39:33
Caught exception:

Traceback (most recent call last):
File “aqt/taskman.py”, line 87, in _on_closures_pending
File “aqt/taskman.py”, line 59, in
File “aqt/taskman.py”, line 75, in wrapped_done
File “aqt/progress.py”, line 128, in finish
File “aqt/progress.py”, line 164, in _closeWin
AttributeError: ‘NoneType’ object has no attribute ‚cancel’

One user kindly recorded a video of this problem.

As you can see this happens during sync and she has to close Anki via Task Manager in order to get it to close.

The problem doesn’t appear when she disables addons via shift when starting Anki.

Could this be because my addon shows dialogues (showInfo and possibly mw.progress as well) right after a user opens his profile? Might this create a conflict with the sync dialogue? And if so: Is there an easy way to wait until sync has finished? I skimmed through the hooks but didn’t find a fitting one yet.

We tested more and apparently my addon is causing the problems. I’ll keep you posted.

Maybe this thread should be moved to the addons forum then, although these problems didn’t happen in earlier Anki versions (at least not before Anki 2.1.28).

At a guess from the error message, perhaps you’re showing a progress window in a place Anki doesn’t expect.

After removing all mw.progress-dialogues it works again, so I assume it’s either a problem of showing 2 mw.progress dialogues at the same time (one generated by my addon and the other one being the sync-dialogue) or a problem of mw.progress.finish() canceling the sync-dialogue. :thinking: