Ankihub install error (code below). How to fix?

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-07-27 23:40:29

Traceback (most recent call last):

File “aqt.taskman”, line 122, in _on_closures_pending

File “aqt.taskman”, line 71, in

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\media_sync.py”, line 138, in _on_download_finished
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\HP\AppData\Roaming\Anki2\addons21\1322529746\media_sync.py”, line 101, in _download_missing_media
for ah_did in ankihub_db.ankihub_deck_ids():

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\db\db.py”, line 484, in ankihub_deck_ids
for did in self.list(“SELECT DISTINCT ankihub_deck_id FROM notes”)

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\db\db.py”, line 103, in list
return self.connection().list(*args, **kwargs)

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\db\db.py”, line 162, in connection
result = DBConnection(conn=sqlite3.connect(ankihub_db.database_path))

sqlite3.OperationalError: unable to open database file

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.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-07-27 23:40:29

Traceback (most recent call last):

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

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

  File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\media_sync.py", line 138, in _on_download_finished
    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\HP\AppData\Roaming\Anki2\addons21\1322529746\media_sync.py", line 101, in _download_missing_media
    for ah_did in ankihub_db.ankihub_deck_ids():

  File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 484, in ankihub_deck_ids
    for did in self.list("SELECT DISTINCT ankihub_deck_id FROM notes")

  File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 103, in list
    return self.connection().list(*args, **kwargs)

  File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 162, in connection
    result = DBConnection(conn=sqlite3.connect(ankihub_db.database_path))

sqlite3.OperationalError: unable to open database file

Sentry link (for developers)

I further receive this error code when I try updating the Ankihub addon:

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-07-27 23:44:56

Traceback (most recent call last):

File “aqt.taskman”, line 122, in _on_closures_pending

File “aqt.taskman”, line 71, in

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 86, in repl

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\addons.py”, line 40, in _check_future_for_exceptions
_old(*args, **kwargs)

File “aqt.addons”, line 1186, in _download_done

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 “aqt.addons”, line 1163, in

File “aqt.addons”, line 1179, in _download_all

File “aqt.addons”, line 1124, in download_and_install_addon

File “aqt.addons”, line 430, in install

File “aqt.addons”, line 454, in _install

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “aqt.addons”, line 716, in backupUserFiles

PermissionError: [WinError 5] Access is denied: ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\1214357311\user_files’ → ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\files_backup’

Can you try deleting the addon and reinstalling?

Hey Ahmed, I tried that, did not work unfortunately.

Can you try if following the steps in this page fixes the problem?

This should fix the problem: AnkiHub Add On Not Working - #3 by jakub.f

Hi Jakub, I tried that, unfortunately, I still get this error:

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-07-28 14:12:31

Traceback (most recent call last):

File “aqt.taskman”, line 122, in _on_closures_pending

File “aqt.taskman”, line 71, in

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 86, in repl

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\addons.py”, line 40, in _check_future_for_exceptions
_old(*args, **kwargs)

File “aqt.addons”, line 1186, in _download_done

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 “aqt.addons”, line 1163, in

File “aqt.addons”, line 1179, in _download_all

File “aqt.addons”, line 1124, in download_and_install_addon

File “aqt.addons”, line 430, in install

File “aqt.addons”, line 454, in _install

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “aqt.addons”, line 716, in backupUserFiles

PermissionError: [WinError 5] Access is denied: ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\1214357311\user_files’ → ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\files_backup’

Salam Abdo, I tried that, unfortunately, I still get this error. Is anyone available to help me via zoom or something? I really need help getting this thing going. Thanks brother. Error code below:

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-07-28 14:12:31

Traceback (most recent call last):

File “aqt.taskman”, line 122, in _on_closures_pending

File “aqt.taskman”, line 71, in

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 86, in repl

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\addons.py”, line 40, in _check_future_for_exceptions
_old(*args, **kwargs)

File “aqt.addons”, line 1186, in _download_done

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 “aqt.addons”, line 1163, in

File “aqt.addons”, line 1179, in _download_all

File “aqt.addons”, line 1124, in download_and_install_addon

File “aqt.addons”, line 430, in install

File “aqt.addons”, line 454, in _install

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “aqt.addons”, line 716, in backupUserFiles

PermissionError: [WinError 5] Access is denied: ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\1214357311\user_files’ → ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\files_backup’

Similar issue. Tried both on my mac and PC. Here’s my error code:

Anki 2.1.56 (07fd88dd) Python 3.9.15 Qt 6.3.2 PyQt 6.3.1
Platform: macOS-13.4-x86_64-i386-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-07-28 14:49:40

Traceback (most recent call last):

File “aqt.taskman”, line 122, in _on_closures_pending

File “aqt.taskman”, line 71, in

File “aqt.taskman”, line 90, in wrapped_done

File “/Users/desouzac/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 39, in on_install_done
on_done(future_with_exception(e))

File “/Users/desouzac/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py”, line 17, in on_new_deck_subscriptions_done
on_done(future_with_exception(future.exception()))

File “/Users/desouzac/Library/Application Support/Anki2/addons21/1322529746/gui/menu.py”, line 417, in on_done
future.result()

File “concurrent.futures._base”, line 439, in result

File “concurrent.futures._base”, line 391, in __get_result

File “/Users/desouzac/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 37, in on_install_done
import_results: List[AnkiHubImportResult] = 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/desouzac/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 85, in
task=lambda: _download_and_install_decks_inner(ankihub_dids),

File “/Users/desouzac/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 114, in _download_and_install_decks_inner
raise exceptions[0]

1322529746.gui.exceptions.DeckDownloadAndInstallError: Error while downloading and installing deck e77aedfe-a636-40e2-8169-2fce2673187e: 1 template required

The new error is caused by the ImageResizer add-on. (You can see that by checking the id in the path to the add-on, it’s the same as the id in the url of the add-on on AnkiWeb.)

To resolve the issue you can follow the same steps as for the AnkiHub add-on:

  • start Anki in safe mode by holding Shift while Anki starts
  • delete the ImageResizer add-on
  • reinstall the ImageResizer add-on (if you want to)

This is a different, unrelated error.

Hi Jakub,

I tried what you mentioned and deleted the ImageResizer add-on. (Did not re-install it).

However, when I proceeded to restart and do updates, I received this error:

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-07-31 11:46:34

Traceback (most recent call last):

File “aqt.taskman”, line 122, in _on_closures_pending

File “aqt.taskman”, line 71, in

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 86, in repl

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\addons.py”, line 40, in _check_future_for_exceptions
_old(*args, **kwargs)

File “aqt.addons”, line 1186, in _download_done

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 “aqt.addons”, line 1163, in

File “aqt.addons”, line 1179, in _download_all

File “aqt.addons”, line 1124, in download_and_install_addon

File “aqt.addons”, line 430, in install

File “aqt.addons”, line 454, in _install

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “aqt.addons”, line 716, in backupUserFiles

PermissionError: [WinError 5] Access is denied: ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\1214357311\user_files’ → ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\files_backup’

Furthermore, When I try to re-install the ImageResizer add-on with the code number (1214357311), I receive the error below:

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-07-31 11:49:53

Traceback (most recent call last):

File “aqt.taskman”, line 122, in _on_closures_pending

File “aqt.taskman”, line 71, in

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 86, in repl

File “C:\Users\HP\AppData\Roaming\Anki2\addons21\1322529746\addons.py”, line 40, in _check_future_for_exceptions
_old(*args, **kwargs)

File “aqt.addons”, line 1186, in _download_done

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 “aqt.addons”, line 1163, in

File “aqt.addons”, line 1179, in _download_all

File “aqt.addons”, line 1124, in download_and_install_addon

File “aqt.addons”, line 430, in install

File “aqt.addons”, line 454, in _install

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “decorator”, line 232, in fun

File “anki.hooks”, line 89, in decorator_wrapper

File “anki.hooks”, line 84, in repl

File “aqt.addons”, line 716, in backupUserFiles

PermissionError: [WinError 5] Access is denied: ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\1214357311\user_files’ → ‘C:\Users\HP\AppData\Roaming\Anki2\addons21\files_backup’

It looks like the ImageResizer add-on did not get fully deleted.

Please open C:\Users\HP\AppData\Roaming\Anki2\addons21\ in a file explorer and delete the 1214357311 folder if possible.

Thank you brother Jakub, I did that, and it worked! I re-installed it. Updated all the add-ons as well without issue. Thanks again for the help.

I need your help with 1 last thing (not a technical issue). I am trying to figure out how to review certain flashcard decks. Somebody mentioned suspend the entire step 1 tag, so I did that, then they said to unsuspend the specific tags I want to study (Pathoma chapter 1), so I did that and unsuspended only those cards… So now I am trying to figure out, how do I study only those cards specifically that I unsuspended? Thank you for your time and help.

1 Like

Go to browse → decks on the left hand side → find AnKing Overhaul → click on it → click on a card → Ctrl + A (Cmd + A) then suspend everything (not just step 1) → go to the pathoma chapter you studied → unsuspend

Then it should say on your main Anki screen, in the “new column” (blue color) those specific cards you just unlocked.

Alternatively, you can create custom study decks, you can see how to do this below:

Let us know if you have any other questions!

1 Like

Jazak Allah Khair brother Ahmed, appreciate your help akhi. That worked! Barak Allah feek.

1 Like