Error: Anki does not show cards

Help! My anki will not allow me to access my cards and is displaying the error message below. I have tried going into my library and renaming collection.media.db2 in hopes that it would remake the file and solve the issue to no avail. I also tried deleting anki and redownloading it and that did not work either. I am not very anki savvy and would appreciate any help, especially if it was dumbed down and walked me through step by step.

Anki 2.1.40 (cf446733) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=False sv=1
Add-ons, last update check: 2021-03-02 18:26:50

Caught exception:
Traceback (most recent call last):
File “aqt/sync.py”, line 104, in on_future_done
File “concurrent/futures/_base.py”, line 432, in result
File “concurrent/futures/_base.py”, line 388, in __get_result
File “concurrent/futures/thread.py”, line 57, in run
File “aqt/sync.py”, line 120, in
File “anki/rsbackend_gen.py”, line 515, in sync_collection
File “anki/rsbackend.py”, line 256, in _run_command
anki.rsbackend.DBError: DBError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some(“database disk image is malformed”))”, kind: Other }

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “aqt/taskman.py”, line 87, in _on_closures_pending
File “aqt/taskman.py”, line 59, in
File “aqt/taskman.py”, line 76, in wrapped_done
File “aqt/sync.py”, line 107, in on_future_done
File “aqt/main.py”, line 903, in on_collection_sync_finished
File “aqt/main.py”, line 681, in reset
File “anki/collection.py”, line 322, in reset
File “anki/schedv2.py”, line 96, in reset
File “anki/decks.py”, line 450, in update_active
File “anki/decks.py”, line 436, in current
File “anki/decks.py”, line 230, in get
File “anki/decks.py”, line 154, in get_legacy
File “anki/rsbackend_gen.py”, line 271, in get_deck_legacy
File “anki/rsbackend.py”, line 256, in _run_command
anki.rsbackend.DBError: DBError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some(“database disk image is malformed”))”, kind: Other }

It seems your collection is corrupted.
Do you use some sync/backup software? If so, you should not run it while Anki is open as that can corrupt your collection.

I’m not entirely sure. My anki usually syncs on it’s own when I exit out but I have not explicitly set up a backup software. I’m not sure how to tell for sure though. I’m sorry I don’t know how to tell you, but if that doesn’t answer your question can you try to help me understand how to?

I mean some external application used for backing up your collection/media to a service other than AnkiWeb.
If you’re not sure, maybe check other apps on your computer?

I checked my apps and I don’t think it’s backing up to anything else besides AnkiWeb

It’s good to do a secondary backup of the contents from time to time, just in case. I do that every two week’s or so, see Deck’s option menu.

Putting aside the question of how it happened (which could be hardware/OS issues), you should be able to restore either from an automatic backup, or your online collection if you were syncing with AnkiWeb.

https://faqs.ankiweb.net/restoring-an-automatic-backup-recovering-from-data-loss.html

Anki on my laptop has no cards and is displaying the below error. Anki on my iPad is working fine. I am not what sure what to do.

DBError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some(“database disk image is malformed”))”, kind: Other }

Some kind of file corruption, are you backed up to ankiweb? Local backups?

I’m backed up to AnkiWeb I think. Do you know how I can download it back or how to get my cards?