I had just downloaded a new anki deck link for class

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

Error message (don't change this)
Anki 24.06.3 (d678e393)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.6.1-x86_64-i386-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 125, 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/mckaylarankin/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/mckaylarankin/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)

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

Error message (don't change this)
Anki 24.06.3 (d678e393)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.6.1-x86_64-i386-64bit

Traceback (most recent call last):

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

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/gui/auto_sync.py", line 99, in sync_with_ankiweb
    future.result()

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

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

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/gui/operations/utils.py", line 39, in wrapper
    return func(*args, **kwargs)

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py", line 55, in sync_with_ankihub
    get_sync_status(aqt.mw, partial(on_sync_status, on_done=on_done))

  File "aqt.sync", line 58, in get_sync_status

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

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

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

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/entry_point.py", line 103, in <lambda>
    raise_exception, on_done=lambda future: 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 "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/entry_point.py", line 100, in raise_exception
    raise exception

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/entry_point.py", line 94, in maybe_call_on_profile_did_open
    _on_profile_did_open()

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/entry_point.py", line 119, in _on_profile_did_open
    _after_profile_setup()

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/entry_point.py", line 163, in _after_profile_setup
    _delete_broken_note_types()

  File "/Users/mckaylarankin/Library/Application Support/Anki2/addons21/1322529746/entry_point.py", line 281, in _delete_broken_note_types
    aqt.mw.col.db.execute(

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

Sentry link (for developers)

Are you getting this error consistently?