Sync Error on Anki and Disc malformation Error? What to do next

Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-11.5.2-x86_64-i386-64bit

Traceback (most recent call last):

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 3291, in execute_sql
cursor.execute(sql, params or ())

sqlite3.DatabaseError: database disk image is malformed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

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

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/auto_sync.py”, line 99, 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/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/operations/utils.py”, line 39, in wrapper
return func(*args, **kwargs)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py”, line 118, in _on_sync_done
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/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py”, line 110, in
task=lambda: ah_deck_updater.update_decks_and_media(to_sync_ah_dids),

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py”, line 61, in update_decks_and_media
self._update_decks(ah_dids)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py”, line 84, in _update_decks
should_continue = self._update_single_deck(ah_did)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py”, line 98, in _update_single_deck
result = self._fetch_and_apply_deck_updates(ankihub_did)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/gui/deck_updater.py”, line 135, in _fetch_and_apply_deck_updates
import_result = self._importer.import_ankihub_deck(

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/main/importing.py”, line 145, in import_ankihub_deck
self._import_note_types(note_types=note_types)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/main/importing.py”, line 187, in _import_note_types
self._import_note_types_into_ankihub_db(note_types=note_types)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/main/importing.py”, line 194, in _import_note_types_into_ankihub_db
ankihub_db.upsert_note_type(

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/db/db.py”, line 553, in upsert_note_type
AnkiHubNoteType.insert(

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 2011, in inner
return method(self, database, *args, **kwargs)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 2082, in execute
return self._execute(database)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 2887, in _execute
return super(Insert, self)._execute(database)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 2600, in _execute
cursor = database.execute(self)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 3299, in execute
return self.execute_sql(sql, params)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 3291, in execute_sql
cursor.execute(sql, params or ())

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 3059, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 192, in reraise
raise value.with_traceback(tb)

File “/Users/johnt/Library/Application Support/Anki2/addons21/1322529746/lib/peewee.py”, line 3291, in execute_sql
cursor.execute(sql, params or ())

peewee.DatabaseError: database disk image is malformed

Can you try this solution?

I’m gonna try that now I just found the folder, it’s really hidden well on mac

It worked! Thank you very much!

1 Like

How did you find the folder on the mac?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.