Bug add-on python application

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

Error message (don't change this)
Anki 25.09.4 (d52ca669) (ao)
Python 3.13.5 Qt 6.9.1 PyQt 6.9.1
Platform: macOS-26.5.2-arm64-arm-64bit-Mach-O

Traceback (most recent call last):

  File "/Users/gycazazurita/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/browser/table/table.py", line 458, in _on_context_menu
    gui_hooks.browser_will_show_context_menu(self.browser, menu)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^

  File "/Users/gycazazurita/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/_aqt/hooks.py", line 1466, in __call__
    hook(browser, menu)
    ~~~~^^^^^^^^^^^^^^^

  File "/Users/gycazazurita/Library/Application Support/Anki2/addons21/1322529746/gui/browser/browser.py", line 273, in _on_browser_will_show_context_menu
    selected_nids = browser.selected_notes()

  File "/Users/gycazazurita/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/browser/browser.py", line 800, in selected_notes
    return self.table.get_selected_note_ids()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^

  File "/Users/gycazazurita/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/browser/table/table.py", line 113, in get_selected_note_ids
    return self._model.get_note_ids(self._selected())
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^

  File "/Users/gycazazurita/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/browser/table/model.py", line 190, in get_note_ids
    return self._state.get_note_ids(self.get_items(indices))
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/gycazazurita/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/browser/table/state.py", line 168, in get_note_ids
    return super().note_ids_from_card_ids(items)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^

  File "/Users/gycazazurita/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/browser/table/state.py", line 36, in note_ids_from_card_ids
    assert self.col.db is not None
           ^^^^^^^^^^^^^^^^^^^^^^^

AssertionError

Sentry link (for developers)

Did this trigger when right clicking on the browser with some notes selected? Can you reproduce it consistently?