This error just keeps popping up idky

Before the error happened, I was…
doing uworld

Error message (don't change this)
Anki 25.02.7 (1b882285)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.26200

Traceback (most recent call last):

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

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

  File "aqt.operations", line 253, in wrapped_done

  File "C:\Users\Sidda\AppData\Roaming\Anki2\addons21\1322529746\gui\media_sync.py", line 64, in on_failure
    raise exception

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

  File "aqt.operations", line 243, in wrapped_op

  File "C:\Users\Sidda\AppData\Roaming\Anki2\addons21\1322529746\gui\media_sync.py", line 68, in <lambda>
    op=lambda _: self._update_deck_media_and_download_missing_media(),

  File "C:\Users\Sidda\AppData\Roaming\Anki2\addons21\1322529746\gui\media_sync.py", line 136, in _update_deck_media_and_download_missing_media
    missing_media_names = self._missing_media_for_ah_deck(ah_did)

  File "C:\Users\Sidda\AppData\Roaming\Anki2\addons21\1322529746\gui\media_sync.py", line 212, in _missing_media_for_ah_deck
    referenced_media = self._media_referenced_by_notes(ah_did)

  File "C:\Users\Sidda\AppData\Roaming\Anki2\addons21\1322529746\gui\media_sync.py", line 204, in _media_referenced_by_notes
    media_names.update(get_media_names_from_note_type(note_type))

  File "C:\Users\Sidda\AppData\Roaming\Anki2\addons21\1322529746\common_utils.py", line 207, in get_media_names_from_note_type
    result.update(_extract_underscored_css_imports(note_type["css"]))

TypeError: 'NoneType' object is not subscriptable

Sentry link (for developers)

Hello,

Follow these steps to solve the issue:

Update your Anki. You can download it here: https://apps.ankiweb.net/. After downloading, simply run the downloaded file to update your application.


Update your AnkiHub add-on:

  1. On your Anki main screen, go to Tools > Add-ons > Check for Updates.
  2. After the update is complete, please restart Anki.

  1. Check Database: Open Anki, go to the top menu, and select Tools > Check Database. This is Anki’s built-in maintenance utility. It will scan for orphaned notes, rebuild broken relationships, and clean up cards attached to missing note types.
  2. Empty Cards: Run Tools > Empty Cards to clear out any blank cards that might have been generated by the missing data.
  3. Restart and Sync: Close Anki, reopen it, and manually trigger the AnkiHub sync again.

We’re working on a fix. This error revealed an issue in your collection, which is that some of the AnKing notes are using a different note type than the original one. This might be already causing issues with updates. To confirm this and fix it, can you use this search query in the browser?

"deck:AnKing Step Deck" (mid:1606536512076 OR mid:1720137682802 OR mid:1720137682803)

This should give you any converted notes. You can use Notes > Change Note Type to convert them back to the original note type (AnKingOverhaul (AnKing Step Deck / AnKingMed))