Error syncing from Ankihub, can't resolve

Error syncing from Ankihub

Error message (don't change this)
Anki 24.06.2 (33a92379)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.22631

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 142, in _on_closures_pending

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\menu.py", line 335, in on_done
    future.result()

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

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

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\utils.py", line 39, in wrapper
    return func(*args, **kwargs)

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\ankihub_sync.py", line 118, in _on_sync_done
    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 "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\ankihub_sync.py", line 110, in <lambda>
    task=lambda: ah_deck_updater.update_decks_and_media(to_sync_ah_dids),

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 61, in update_decks_and_media
    self._update_decks(ah_dids)

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 84, in _update_decks
    should_continue = self._update_single_deck(ah_did)

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 98, in _update_single_deck
    result = self._fetch_and_apply_deck_updates(ankihub_did)

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 135, in _fetch_and_apply_deck_updates
    import_result = self._importer.import_ankihub_deck(

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\main\importing.py", line 147, in import_ankihub_deck
    dids = self._import_notes(

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\main\importing.py", line 237, in _import_notes
    ) = self._prepare_notes(notes_data=upserted_notes_data)

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\main\importing.py", line 308, in _prepare_notes
    note, operation = self._prepare_note(

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\main\importing.py", line 595, in _prepare_note
    changed = self._prepare_note_inner(

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\main\importing.py", line 637, in _prepare_note_inner
    changed_fields = self._prepare_fields(

  File "C:\Users\dhruv\AppData\Roaming\Anki2\addons21\1322529746\main\importing.py", line 685, 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)

@The_MangoMedic This is an issue in your β€œMangoMedic for NEET PG” deck. It apparently has a note (id: 1720899303875) with an additional field (Sketchy 2) that doesn’t exist in the note type, which is causing an error. You should be able to fix the issue by deleting the note from the deck (via a Delete Note suggestion) then uploading it again (after making sure the local note type matches the one on AnkiHub; no extra or missing fields).

@abdo.nh

Is this issue related or different? https://www.reddit.com/r/MedSchoolAnkiIndia/comments/1e9ihvv/comment/leimnuf/?context=3

I think they both are unrelated to each other

1 Like

If you are having the issue, can you do the following:

Please use AnkiHub > Help > Upload logs and data and let us know the filename shown.

1 Like

that was my issue still not resolved

Please also upload your logs and data as explained.