Everytime I sync or close anki, i get this error message about ankihub

**Before the error happened, I was closing the anki app or manually syncing. It occurred while the “checking…” pop-up window appeared. It occurs every time I manually sync or close the app. Opening the app doesn’t cause the error. I have to force quit anki after the error. I am on Windows 11

**Correction: Opening the app DOES cause the error. However, sync on opening of the app works fine. I only need to force close on manual sync or when closing the app. Ankihub is set to sync at the same time as syncs to ankiweb.

Error message (don't change this)
Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.22621
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-09-09 08:53:06

Traceback (most recent call last):

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

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

  File "C:\Users\rikhi\AppData\Roaming\Anki2\addons21\1322529746\gui\media_sync.py", line 180, in _on_download_finished

  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\rikhi\AppData\Roaming\Anki2\addons21\1322529746\gui\media_sync.py", line 117, in _update_deck_media_and_download_missing_media
    if not self._client.is_media_upload_finished(ah_did):

  File "C:\Users\rikhi\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 1060, in is_media_upload_finished
    deck_info = self.get_deck_by_id(ah_did)

  File "C:\Users\rikhi\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 722, in get_deck_by_id
    raise AnkiHubHTTPError(response)

1322529746.ankihub_client.ankihub_client.AnkiHubHTTPError: AnkiHub request error: 404 Not Found

Sentry link (for developers)

This appears to be caused by a deleted deck you were subscribed to (specifically, this one). Please try the following steps to make the error go away:

  1. Go to Tools > Add-ons, select the AnkiHub add-on then click Show Files.
  2. The add-on’s folder will open. Find the subfolder named user_files and open it.
  3. Under user_files, you’ll see several subfolders with random names. Open each one and delete the ankihub.db files.
  4. Try syncing again.
1 Like

We should handle deleted decks gracefully in the add-on

This is not a frequent issue, but it appears to be still there