Won't let me close anki

Before the error happened, I was…
closing anki

Error message (don't change this)
Anki 24.04.1 (ccd9ca1a)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.4.1-arm64-arm-64bit

Traceback (most recent call last):

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

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

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

  File "aqt.sync", line 126, 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 "/Users/ericdr/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py", line 185, in _upload_if_full_sync_triggered_by_ankihub
    if config.schema_to_do_full_upload_for_once() == collection_schema():

  File "/Users/ericdr/Library/Application Support/Anki2/addons21/1322529746/main/utils.py", line 659, in collection_schema
    return aqt.mw.col.db.scalar("select scm from col")

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

Sentry link (for developers)

If you sync with AnkiWeb before closing Anki, does the error appear again?

It doesn’t allow me to sync with anki web using the “sync button”. None of the items on the interface are clickable. I click the close button, it shows the syncing screen briefly then shows the anki hub error but will not close.

That’s weird. Can you post a screenshot of the main window?