Please help fix this bug, not letting me reset optional tag

Anki 26.09 (e62e7739) (ao)
Python 3.13.15 Qt 6.11.2 PyQt 6.11.0
Platform: macOS-15.7.3-arm64-arm-64bit-Mach-O

File “/Applications/Anki.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/threading.py”, line 1015, in _bootstrap
self._bootstrap_inner()
File “/Applications/Anki.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/threading.py”, line 1044, in _bootstrap_inner
self.run()
File “/Applications/Anki.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/threading.py”, line 995, in run
self._target(*self._args, **self._kwargs)
File “/Applications/Anki.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/concurrent/futures/thread.py”, line 93, in _worker
work_item.run()
File “/Applications/Anki.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/concurrent/futures/thread.py”, line 59, in run
result = self.fn(*self.args, **self.kwargs)
File “/Users/joannaphilips/Library/Application Support/Anki2/addons21/1322529746/gui/browser/browser.py”, line 705, in
task=lambda: _reset_optional_tag_group(extension_id=extension_id),
File “/Users/joannaphilips/Library/Application Support/Anki2/addons21/1322529746/gui/browser/browser.py”, line 721, in _reset_optional_tag_group
update_decks_and_media(on_done=on_done, ah_dids=[extension_config.ah_did], start_media_sync=False)
File “/Users/joannaphilips/Library/Application Support/Anki2/addons21/1322529746/gui/operations/utils.py”, line 36, in wrapper
return func(*args, **kwargs)
File “/Users/joannaphilips/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py”, line 242, in update_decks_and_media
run_update(
File “/Users/joannaphilips/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py”, line 206, in run_update
).failure(on_failure).with_progress().run_in_background()
File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/operations/init.py”, line 263, in run_in_background
File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/operations/init.py”, line 281, in _run
File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/taskman.py”, line 113, in with_progress
File “/Users/runner/work/anki/anki/out/installer/build/anki/macos/app/Anki.app/Contents/Resources/app_packages/aqt/taskman.py”, line 74, in run_in_background
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AnkiHub [‘1322529746’, 2026-10-08T14:34, ‘None’, mod]
UWorld AMBOSS COMLEX - Question ID Converter [‘699193084’, 2026-03-13T07:18, ‘None’, mod]

===IDs of active AnkiWeb add-ons===
1322529746 699193084

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Custom Background Image and Gear Icon [‘1210908941’, 2025-12-17T07:00, ‘None’, mod]
FSRS Helper Postpone Advance Load Balance Easy Days Disperse Siblings [‘759844606’, 2026-05-14T01:49, ‘None’, ‘’]
Review Heatmap [‘1771074083’, 2022-06-29T20:43, ‘None’, ‘’]

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

Read topic
Reading: Please help fix this bug, not letting me reset optional tag

Thanks for sharing the traceback and environment info—that’s very helpful.

This looks like an internal error when AnkiHub tries to run the “Reset optional tag group” action and then call update_decks_and_media. The stack trace you pasted stops right before the actual exception message (e.g. KeyError, TypeError, etc.), so I can’t see why it’s failing—only where.

For now, here are some concrete steps to try and things that will help us narrow this down:


1. Get the full error message

The most important missing piece is the actual error line at the bottom of the traceback.

  1. Reproduce the issue:
    • Open the Browser.
    • Use the AnkiHub menu to Reset optional tag group again.
  2. When the error dialog pops up:
    • Click “Copy to clipboard” (or similar).
    • Paste the entire contents, including the final error line (e.g. Exception: ...), into your topic.

That last line usually tells us exactly what’s wrong (e.g. a missing config field, invalid deck id, etc.).


2. Confirm which deck / extension you’re resetting

When you trigger Reset optional tag group:

  • Which AnkiHub deck/extension is this for? (e.g. AnKing Overhaul, etc.)
  • Is it a single AnkiHub-connected deck or do you have multiple?

Sometimes this error happens if:

  • The extension’s config is missing or corrupted (e.g. ah_did not set or pointing to a deleted deck).
  • The deck was renamed or moved in a way AnkiHub doesn’t expect.

If you can, also:

  1. Go to Tools → Add-ons → AnkiHub → Config.
  2. Look for the entry related to that deck and check if:
    • ah_did exists.
    • That deck ID actually corresponds to an existing deck in your collection.

If you’re comfortable, you can screenshot or paste just that relevant part (without personal data).


3. Basic troubleshooting to try now

While we investigate, you can try these safe steps:

  1. Restart Anki and macOS (to rule out a temporary threading issue).
  2. Disable other add-ons temporarily:
    • Tools → Add-ons → click “Toggle Enabled” on all except AnkiHub.
    • Restart Anki and try Reset optional tag group again.
  3. Check for AnkiHub updates:
    • In Anki: Tools → Add-ons → Select AnkiHub → View Files to confirm version if visible, or just:
    • Go to AnkiWeb and make sure you’re on the latest AnkiHub add-on version.
  4. Verify Anki version:
    • You’re on Anki 26.09 (alpha/ao build). If this is a very new or experimental build, there’s a chance this is a compatibility issue between that build and the current AnkiHub version.
    • If possible, note whether this worked previously on an older Anki version for you.

4. What I suspect

Based on where it fails:

_reset_optional_tag_group -> update_decks_and_media -> run_update().failure(...).with_progress().run_in_background()

This is likely either:

  • A bug in the AnkiHub add-on with optional tag reset on the latest Anki build, or
  • A bad/empty extension config for that AnkiHub deck.

Once you share:

  1. The full error (including the last few lines), and
  2. Which AnkiHub deck you’re using + whether this worked before,

we can:

  • Confirm if this matches a known bug and, if so, log it / link you to the fix or a workaround (e.g. manually resetting tags via browser search + tag operations).
  • Or guide you through resetting / repairing the AnkiHub deck connection for that extension if the config is corrupted.

Please reply in that topic with:

  • The complete error message (including the bottom lines).
  • Name of the AnkiHub deck.
  • Whether this started only after updating Anki or AnkiHub.

I’ll use that to give you a more precise fix or a step-by-step workaround to reset the optional tags manually if needed.

Hello,

I would be happy to help. :slight_smile:

I believe that the devs are aware of the issue, though a fix has not yet been issued. In the meantime, if you are having trouble with an optional tag you can unsubscribe and resubscribe to the tag and it should suffice to achieve the same result

Please let me know if that answers your question, and if there’s anything else I can help with. :slight_smile:

hi, unfortunately i did try to unsub and resub the whole deck and then the optional but it still is doing the same thing.

When you mention that it is “still doing the same thing” can you share a bit more detail about the specific difficulties you’re running into?

The more context you can share the easier it may be to be of help. Screenshots are ideal, if you can, just so I can see what you’re seeing

Same issue, macOS 14.7.6, Anki 26.09.3, add-on from Oct 8. The group still appears in the reset menu and the deck is in Deck Management, but no tags re-apply after sync.

  1. In the Browser, I use AnkiHub → Reset an Optional Tag Group and choose the group. It asks for confirmation, then an error window appears. The traceback ends at taskman.py line 74 and is the same one posted above.

  2. After that, the AnkiHub_Optional tags are gone from the Browser sidebar, and searching tag:AnkiHub_Optional::* returns 0 notes.

  3. AnkiHub → Sync with AnkiHub only says “no new notes added or updated.” I also quit and reopened Anki, then synced again, and the tags still don’t come back.

  4. The group still appears in the Reset an Optional Tag Group list, and the deck is in Deck Management, so the subscription itself looks intact.

this is what i see -i have added the screenshot to this; this is what pops up when i try to reset an optional tag group

@jp0000 @danieljekov3 Could you post the names of the optional tag groups you’re trying to reset? Normally, syncing from AnkiHub > Sync with AnkiHub after using the Reset option should refresh the tags, unless the issue is specific to the group.