AnkiHub Sync - Error Message help

Before the error happened, I was syncing from Ankihub, because I had done some cards on the anki app on my iPhone.

Error message (don't change this)
Anki 2.1.56 (07fd88dd) Python 3.9.15 Qt 6.3.2 PyQt 6.3.1
Platform: macOS-12.6.3-x86_64-i386-64bit
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-05-23 12:08:55

Traceback (most recent call last):

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 324, in _update_or_create_note_inner
    note = aqt.mw.col.get_note(id=NoteId(note_data.anki_nid))

  File "anki.collection", line 476, in get_note

  File "anki.notes", line 49, in __init__

  File "anki.notes", line 55, in load

  File "anki._backend_generated", line 652, in get_note

  File "anki._backend", line 151, in _run_command

anki.errors.NotFoundError: Your database appears to be in an inconsistent state. Please use the Check Database action.


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "anki.notes", line 154, in _field_index

KeyError: 'Sketchy 2'


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

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

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

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

  File "aqt.sync", line 112, in on_future_done

  File "aqt.main", line 990, in on_collection_sync_finished

  File "_aqt.hooks", line 4595, in __call__

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/auto_sync.py", line 93, in _on_sync_did_finish
    raise auto_sync_state.exception_on_last_ah_sync

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/auto_sync.py", line 118, in _sync_with_ankihub_and_ankiweb
    _maybe_sync_with_ankihub(is_startup_sync=is_startup_sync)

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/auto_sync.py", line 147, in _maybe_sync_with_ankihub
    ah_sync.sync_all_decks_and_media()

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/sync.py", line 43, in sync_all_decks_and_media
    self._sync_all_decks()

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/sync.py", line 65, in _sync_all_decks
    should_continue = self._sync_deck(ah_did)

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/sync.py", line 77, in _sync_deck
    result = self._download_updates_for_deck(ankihub_did)

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/sync.py", line 114, in _download_updates_for_deck
    import_result = self._importer.import_ankihub_deck(

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 101, in import_ankihub_deck
    return self._import_ankihub_deck_inner(

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 144, in _import_ankihub_deck_inner
    dids = self._import_notes(

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 190, in _import_notes
    note = self._update_or_create_note(

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 268, in _update_or_create_note
    note = self._update_or_create_note_inner(

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 351, in _update_or_create_note_inner
    self.prepare_note(

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 392, in prepare_note
    changed_fields = self._prepare_fields(

  File "/Users/Manny/Library/Application Support/Anki2/addons21/1322529746/importing.py", line 454, in _prepare_fields
    if note[field.name] != field.value:

  File "anki.notes", line 159, in __getitem__

  File "anki.notes", line 156, in _field_index

KeyError: 'Sketchy 2'

Sentry link (for developers)

You should be able to sync again.

The problem is related to this post: AnkiHub sync - Error message