Issue with AnkiHub add-on synching new Image Occlusion Enhanced cards

Before the error happened, I was adding new image occlusion enhanced cards on my local Anki platform and was attempting to upload my new changes to AnkiHub. When I tried to synch to AnkiHub, I got this error
[Replace this text.]

Error message (don't change this)
Anki 24.06.3 (d678e393)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.6.1-arm64-arm-64bit

Traceback (most recent call last):

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

KeyError: 'Answer Mask 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 "/Users/landonpower/Library/Application Support/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 "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/gui/operations/utils.py", line 39, in wrapper
    return func(*args, **kwargs)

  File "/Users/landonpower/Library/Application Support/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 "/Users/landonpower/Library/Application Support/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 "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py", line 61, in update_decks_and_media
    self._update_decks(ah_dids)

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py", line 84, in _update_decks
    should_continue = self._update_single_deck(ah_did)

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py", line 98, in _update_single_deck
    result = self._fetch_and_apply_deck_updates(ankihub_did)

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py", line 135, in _fetch_and_apply_deck_updates
    import_result = self._importer.import_ankihub_deck(

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/main/importing.py", line 147, in import_ankihub_deck
    dids = self._import_notes(

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/main/importing.py", line 237, in _import_notes
    ) = self._prepare_notes(notes_data=upserted_notes_data)

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/main/importing.py", line 308, in _prepare_notes
    note, operation = self._prepare_note(

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/main/importing.py", line 595, in _prepare_note
    changed = self._prepare_note_inner(

  File "/Users/landonpower/Library/Application Support/Anki2/addons21/1322529746/main/importing.py", line 637, in _prepare_note_inner
    changed_fields = self._prepare_fields(

  File "/Users/landonpower/Library/Application Support/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: 'Answer Mask 2'

Sentry link (for developers)

Which deck is this? Can you go to AnkiHub > Help > Upload logs and data and post the filename shown?

It might be this deck
CWRU_SOM_Personal

Here is the filename after I ran that:

ankihub_addon_debug_info_2ef31_1725648523.zip

You have some notes (Example: note:1725457991383) with an additional field named โ€œAnswer Mask 2โ€ that doesnโ€™t exist in the original note type uploaded to AnkiHub. Note type modifications are not supported yet. To fix the issue, you have to delete the problematic notes from the deck (submit note deletion suggestions) and upload them after fixing the note type.

How would I go about deleting the โ€œAnswer Mask 2โ€ from the Image Occlusion Enhanced (CWRU_SOM_Personal / powerlandon369@gmail.com) so that those IOE cards are still able to be uploaded to AnkiHub?

You have to delete the notes containing this field (submit note deletion suggestions).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.