Before the error happened, I was…
[Replace this text.]

Error message (don't change this)
Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: macOS-14.4.1-arm64-arm-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2024-06-07 18:32:41

Traceback (most recent call last):

  File "aqt.taskman", line 122, in _on_closures_pending

  File "aqt.taskman", line 71, in <lambda>

  File "aqt.taskman", line 90, in wrapped_done

  File "/Users/osamahussein/Library/Application Support/Anki2/addons21/1322529746/gui/operations/", line 76, in _on_subdecks_updated

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "concurrent.futures.thread", line 58, in run

  File "/Users/osamahussein/Library/Application Support/Anki2/addons21/1322529746/gui/operations/", line 25, in <lambda>
    task=lambda: build_subdecks_and_move_cards_to_them(

  File "/Users/osamahussein/Library/Application Support/Anki2/addons21/1322529746/main/", line 79, in build_subdecks_and_move_cards_to_them
    if, include_subdecks=True) == 0:

  File "anki.decks", line 234, in card_count

AttributeError: 'NoneType' object has no attribute 'scalar'

Sentry link (for developers)

This is caused by an old Anki issue and it shouldn’t appear on more recent versions. I recommend updating to the latest: Anki - powerful, intelligent flashcards