AnkiHub login changed all my decks

Before the error happened, I was…
Re-logged into AnkiHub after I got the notice that it failed to sync and I needed to verify my email. It completely changed all of my decks to how they were maybe a year ago. I lost all the decks I had made for Step 1 so I was trying to open a backup from earlier today to restore all the decks.

Error message (don't change this)
Anki 25.02.5 (29192d15)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-15.7.3-arm64-arm-64bit

Traceback (most recent call last):

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

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

  File "aqt.operations", line 253, in wrapped_done

  File "/Users/chloetyznik/Library/Application Support/Anki2/addons21/1322529746/gui/media_sync.py", line 60, in on_failure
    raise exception

  File "concurrent.futures.thread", line 58, in run

  File "aqt.operations", line 243, in wrapped_op

  File "/Users/chloetyznik/Library/Application Support/Anki2/addons21/1322529746/gui/media_sync.py", line 64, in <lambda>
    op=lambda _: self._update_deck_media_and_download_missing_media(),

  File "/Users/chloetyznik/Library/Application Support/Anki2/addons21/1322529746/gui/media_sync.py", line 142, in _update_deck_media_and_download_missing_media
    self._client.download_media(missing_media_names, ah_did)

  File "/Users/chloetyznik/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 531, in download_media
    media_path = media_dir_path / media_name

TypeError: unsupported operand type(s) for /: 'NoneType' and 'str'

Sentry link (for developers)

Hello,

Regarding the lost cards:

AnkiHub does not delete any cards you have created in Anki. You may be referring to Anki itself; when you clicked Sync in Anki, you were likely prompted with a confirmation message from AnkiWeb (not AnkiHub). You might have then clicked “download from AnkiWeb” instead of “upload to AnkiWeb.” This could have overwritten your local Anki collection with an older version stored in the cloud.

As you mentioned, you can always restore from a backup created before the incident occurred: How to Restore from Backup


Please note that your AnkiHub account is different from your AnkiWeb account. Please visit the two websites below to make sure you have the correct login credentials for each:

AnkiWeb is the cloud backup service for Anki itself, while AnkiHub is the service used to download your deck and keep it up to date.


Regarding the error message:

Please ensure you are using the latest version of Anki. You can download it here: https://apps.ankiweb.net/

After downloading, simply run the file to update your application.