Unable to upload deck to ANKIWeb due to error- DATABASE CORRUPT

Anki 2.1.37 (6d596c8f) 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-05-17 12:09:12

Caught exception:
Traceback (most recent call last):
File “aqt/taskman.py”, line 87, in _on_closures_pending
File “aqt/taskman.py”, line 59, in
File “aqt/mediacheck.py”, line 81, in _on_finished
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/mediacheck.py”, line 70, in _check
File “anki/media.py”, line 192, in check
File “anki/rsbackend_gen.py”, line 211, in check_media
File “anki/rsbackend.py”, line 264, in _run_command
anki.rsbackend.DBError: DBError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some(“database disk image is malformed”))”, kind: Other }

I have tried checking database, updated to the latest Anki 2.1 but nothing seems to work.

If there is any idea of how to fix this, it would be much appreciated

You’ll need to restore from a backup: Managing Files - Anki Manual

HI I tried to do that and it is showing that there is still a DB error- sqlitefailureerror

Does this mean I have to repair the corruption myself?

Maybe an earlier backup will give you more luck? Restoring from a backup is preferable to trying to repair the damage, which may not be possible.