Add-on-error with syncing

Before the error happened, I was…
syncing my deck to anki hub

Error message (don't change this)
Anki 2.1.66 (70506aeb) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.22631
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2024-06-23 22:20:23

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 "aqt.sync", line 119, in on_future_done

  File "decorator", line 232, in fun

  File "anki.hooks", line 89, in decorator_wrapper

  File "anki.hooks", line 86, in repl

  File "C:\Users\atngu\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\ankihub_sync.py", line 194, in _upload_if_full_sync_triggered_by_ankihub
    aqt.sync.full_upload(mw, on_done)  # type: ignore

  File "aqt.sync", line 248, in full_upload

  File "aqt.taskman", line 92, in with_progress

  File "aqt.taskman", line 62, in run_in_background

  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 "C:\Users\atngu\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\subdecks.py", line 76, in _on_subdecks_updated
    future.result()

  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 "C:\Users\atngu\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\subdecks.py", line 25, in <lambda>
    task=lambda: build_subdecks_and_move_cards_to_them(

  File "C:\Users\atngu\AppData\Roaming\Anki2\addons21\1322529746\main\subdecks.py", line 57, in build_subdecks_and_move_cards_to_them
    nid_to_dest_deck_name = _nid_to_destination_deck_name(

  File "C:\Users\atngu\AppData\Roaming\Anki2\addons21\1322529746\main\subdecks.py", line 95, in _nid_to_destination_deck_name
    tags_str = aqt.mw.col.db.scalar("SELECT tags FROM notes WHERE id = ?", nid)

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

Sentry link (for developers)

Is this appearing every time? I recommend trying the latest Anki version if you can.

It only happened once and resolved after I exited out of the application and tried again.