Error Downloading

Before the error happened, I was…
[Replace this text.]

Error message (don't change this)
Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: macOS-12.6.6-x86_64-i386-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-11-15 16:29:10

Traceback (most recent call last):

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db.py", line 519, in remove_deck
    conn.execute(

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db_utils.py", line 30, in execute
    raise e

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db_utils.py", line 22, in execute
    cur.execute(sql, args)

sqlite3.DatabaseError: database disk image is malformed


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 117, in _download_and_install_decks_inner
    result.append(_download_and_install_single_deck(ah_did))

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 149, in _download_and_install_single_deck
    result = _install_deck(

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 179, in _install_deck
    import_result = importer.import_ankihub_deck(

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/main/importing.py", line 124, in import_ankihub_deck
    ankihub_db.remove_deck(ankihub_did)

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db.py", line 519, in remove_deck
    conn.execute(

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db_utils.py", line 61, in __exit__
    self._conn.commit()

sqlite3.DatabaseError: database disk image is malformed


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

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

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

  File "aqt.taskman", line 90, in wrapped_done

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 41, in on_install_done
    on_done(future_with_exception(e))

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py", line 72, in <lambda>
    on_done=lambda future: on_new_deck_subscriptions_done(

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py", line 27, in on_new_deck_subscriptions_done
    on_done(future_with_exception(future.exception()))

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/auto_sync.py", line 74, in sync_with_ankiweb
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 39, 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/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 69, in <lambda>
    task=lambda: _download_and_install_decks_inner(ankihub_dids),

  File "/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 129, in _download_and_install_decks_inner
    raise exceptions[0]

1322529746.gui.exceptions.DeckDownloadAndInstallError: Error while downloading and installing deck e77aedfe-a636-40e2-8169-2fce2673187e: database disk image is malformed

Sentry link (for developers)

Have you tried my suggestion here?

There’s unfortunately no backup to be done as it was my first time downloading it.

Is there a way for me to download it from a file in lieu of from anki hub? I have tried everything.

This your first time using Anki? Can you create cards normally or does the same error appear?

This is not. No issue with creating cards. I am also able to download other decks from anki hub (I.e. sketchy pepper) but not the anking deck.

Interesting.

@Ahmed7 Do we have the deck as apkg on Drive or something so @mdearey can try downloading it from there?

I dont believe we do, @andrew

I can export mine but i have stuff in lecture notes so I’m not sure how to export without that

You can export the deck to a separate profile, use Find and Replace with the following options to empty the Lecture Notes field, then export again:
image

Any update? The entire error code is attached below. I still have been unable to download the deck without getting an error message.

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0

Platform: macOS-12.6.6-x86_64-i386-64bit

Flags: frz=True ao=True sv=3

Add-ons, last update check: 2023-11-17 09:16:59

Traceback (most recent call last):

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db.py”, line 519, in remove_deck

conn.execute(

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db_utils.py”, line 30, in execute

raise e

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db_utils.py”, line 22, in execute

cur.execute(sql, args)

sqlite3.DatabaseError: database disk image is malformed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 117, in _download_and_install_decks_inner

result.append(_download_and_install_single_deck(ah_did))

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 149, in _download_and_install_single_deck

result = _install_deck(

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 179, in _install_deck

import_result = importer.import_ankihub_deck(

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/main/importing.py”, line 124, in import_ankihub_deck

ankihub_db.remove_deck(ankihub_did)

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db.py”, line 519, in remove_deck

conn.execute(

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/db/db_utils.py”, line 61, in exit

self._conn.commit()

sqlite3.DatabaseError: database disk image is malformed

The above exception was the direct cause of the following exception:

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/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 41, in on_install_done

on_done(future_with_exception(e))

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py”, line 72, in

on_done=lambda future: on_new_deck_subscriptions_done(

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py”, line 27, in on_new_deck_subscriptions_done

on_done(future_with_exception(future.exception()))

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/auto_sync.py”, line 74, in sync_with_ankiweb

future.result()

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

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

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 39, 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/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 69, in

task=lambda: _download_and_install_decks_inner(ankihub_dids),

File “/Users/margaretdearey/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py”, line 129, in _download_and_install_decks_inner

raise exceptions[0]

1322529746.gui.exceptions.DeckDownloadAndInstallError: Error while downloading and installing deck e77aedfe-a636-40e2-8169-2fce2673187e: database disk image is malformed

What if you try installing Anki version 23.10 and try again?

Or perhaps create a new profile and do the same?

@mdearey Just to narrow down the source of the error: can you create a new profile, log in to your AnkiHub account there and try downloading the AnKing deck?

@mdearey , I’m wondering if this is caused by limited available storage on your computer. Can you let us know how much free storage you have on your computer? You can do so following these instructions: See used and available storage space on your Mac - Apple Support.

I have 32.49 GB available.

@jakub.f , do you have any idea about this one?

@Ahmed7 , can you export your deck and share it with @mdearey in a PM?

Done!

@mdearey lmk if you can access the folder and everything goes well