Anki hub error

The category for general support questions related to using AnkiHub.

Things not to ask about here:

Please include supporting information and documents such as screenshots, recordings, etc.Anki 26.09.2 (bb0dd6d1) (ao)
Python 3.13.15 Qt 6.11.2 PyQt 6.11.0
Platform: macOS-26.6.1-arm64-arm-64bit-Mach-O

Traceback (most recent call last):

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/webview.py”, line 213, in cmd

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/webview.py”, line 304, in _onCmd

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/webview.py”, line 873, in _onBridgeCmd

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/decorator/_init_.py”, line 247, in fun

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/anki/hooks.py”, line 91, in decorator_wrapper

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/anki/hooks.py”, line 88, in repl

File “/Users/noahschneider/Library/Application Support/Anki2/addons21/24411424/custom_shortcuts.py”, line 440, in cs_captureBridgeToggleSticky
return _old(self,cmd)

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/editor_legacy.py”, line 462, in onBridgeCmd

File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/_aqt/hooks.py”, line 2662, in _call_

File “/Users/noahschneider/Library/Application Support/Anki2/addons21/1322529746/gui/editor.py”, line 90, in _on_field_unfocus_auto_protect
ah_field_names_lower = {f.lower() for f in ankihub_db.note_type_field_names(NotetypeId(note.mid))}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^

File “/Users/noahschneider/Library/Application Support/Anki2/addons21/1322529746/db/db.py”, line 592, in note_type_field_names
(field for field in self.note_type_dict(anki_note_type_id)[“flds”]),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^

TypeError: ‘NoneType’ object is not subscriptable

Thank you for reaching out! Our moderators have been notified and will assist you shortly. In the meantime, you can get an instant response from me simply by @ mentioning my username`. Alternatively, start a private conversation with me (see screenshot below). If you ask me a question, I will do my best to respond using only verified information found in the official AnkiHub docs and the Anki manual.

You can also find answers to common questions in our FAQ and Docs.

Thinking

Search
Found 0 results for ‘tags:official TypeError ‘NoneType’ object is not subscriptable note_type_field_names ankihub_db category::person_raising_hand: Support order:latest max_posts:20 status:open’

This error is coming from the AnkiHub add-on when it tries to look up information about a note type, but doesn’t find it in the AnkiHub database:

TypeError: 'NoneType' object is not subscriptable
...
self.note_type_dict(anki_note_type_id)["flds"]

In practice, this usually means the current note type is not (or no longer) linked to an AnkiHub deck, or the local AnkiHub database is out of sync/corrupted.

Steps to try

Please go through these in order and report back which step (if any) fixes it:

  1. Identify the note type causing the error

    • Open the note that triggered the error in the editor.
    • In the editor, click the note type name at the top (e.g. “AnKingOverhaul v11 …”) → “Manage”.
    • Note the exact name of the note type and whether it’s one of the official AnKing/AnkiHub note types or something custom/duplicated.
  2. Check if the note type is linked to an AnkiHub deck

    • In Anki, go to Tools → Add-ons → AnkiHub → Config / Menu (depending on version).

    • Look for your subscribed deck (e.g. AnKing Step Deck / AnKingMed).

    • Confirm that the deck shows as linked and that the note type in question is actually the one used by that AnkiHub deck.

    • If you recently:

      • Duplicated a note type,
      • Renamed a note type,
      • Imported cards from another profile/deck,

      it’s possible the note type no longer matches what AnkiHub expects. In that case, try switching the problem cards back to the original AnkiHub note type (via Browse → select cards → Notes → Change Note Type…).

  3. Resync / refresh the AnkiHub local database

    • From Anki’s main window, open the AnkiHub menu.
    • Look for an option like “Rebuild local database”, “Refresh deck metadata”, or “Clear cache” (wording may differ depending on version).
    • Run that, then restart Anki and test again.
  4. Temporarily disable the auto-protect hook

    • The error is triggered in:
      addons21/1322529746/gui/editor.py, line 90, in _on_field_unfocus_auto_protect
      
    • This is the AnkiHub “auto protect” feature when you leave a field.
    • To confirm it’s the culprit:
      • Go to Tools → Add-ons.
      • Select AnkiHub (ID 1322529746).
      • Click Disable.
      • Restart Anki and try editing the same note again.
    • If the error disappears when AnkiHub is disabled, we’ve confirmed it’s a bug in that feature for your specific note type.
  5. Check for add-on conflicts

    • The traceback also shows Custom Shortcuts is involved:
      custom_shortcuts.py ... cs_captureBridgeToggleSticky
      
    • Conflicts between AnkiHub and other editor-related add-ons can cause weird bridge errors.
    • Try:
      • Disable all add-ons except AnkiHub.
      • Restart Anki.
      • Test again.
    • If it works with only AnkiHub enabled, re-enable add-ons one-by-one to see which one reintroduces the error.

Please reply with:

To help narrow this down (and so we can flag it for the devs if needed), could you reply with:

  1. The exact note type name of the card that triggers the error.
  2. Which AnkiHub deck(s) you’re subscribed to that use that note type (e.g. AnKing Step Deck, AnKingMed, etc.).
  3. Whether:
    • Rebuilding/refreshing the AnkiHub local database helped.
    • Disabling all other add-ons except AnkiHub changed anything.
  4. A screenshot of:
    • The AnkiHub deck settings window (showing the linked deck).
    • The Manage Note Types window highlighting the note type in question.

With that info, we can say more precisely whether it’s a mis-linked note type on your side or a bug in the current AnkiHub version that should be reported to the team.

If you disable the review heatmap add-on, does the error go away?

No, but i did notice the error page only appears when i attempt to open the edit current card page.

Is this in the AnKing Step deck? Can you use AnkiHub>Help>Upload logs and post the filename shown?

Please try the following workarounds:

  • Go to AnkiHub>Deck Management, unsubscribe from the deck then subscribe again from https://app.ankihub.net and sync.
  • If that does not help, disable the “Automatically protect fields when edited” option under Deck Management.