Syncing problem

Mahovis's Avatar

Mahovis

10 May, 2013 09:01 PM

I've been receiving this message everytime I try to sync Anki:

Syncing failed:
Traceback (most recent call last):
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.sync", line 255, in run
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.sync", line 312, in _sync
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.sync", line 342, in _syncMedia
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.sync", line 654, in sync
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.media", line 358, in findChanges
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.media", line 350, in _changed
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.db", line 68, in scalar
  File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.db", line 35, in execute
DatabaseError: file is encrypted or is not a database

I've tried the following, so far:
Uploading my collection from Ankidroid to Ankiweb, then a full sync downloading from AnkiWeb.
Repairing the database using the procedure for corrupted collections, using sqlite as stated on the manual.

None of those worked. When checking the database there are no error messages, and Ankidroid is working fine, syncing normally with AnkiWeb.

I'm using Anki on a Windows XP machine.

I've attached my collection.apkg without any media.

  1. 1 Posted by Soren Bjornstad on 10 May, 2013 09:04 PM

    Soren Bjornstad's Avatar

    After you checked the database on the desktop, did you full sync up on the
    desktop and then full sync down on AnkiDroid? Have you seen any other error
    messages.

  2. 2 Posted by Mahovis on 10 May, 2013 09:11 PM

    Mahovis's Avatar

    Yes, I did the full sync up, but it did not complete and I received a slightly different error message:

    Syncing failed:
    Traceback (most recent call last):
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.sync", line 255, in run
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.sync", line 305, in _sync
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.sync", line 335, in _fullSync
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.sync", line 342, in _syncMedia
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.sync", line 654, in sync
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.media", line 358, in findChanges
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.media", line 350, in _changed
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.db", line 68, in scalar
      File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.db", line 35, in execute
    DatabaseError: file is encrypted or is not a database

  3. 3 Posted by Mahovis on 10 May, 2013 10:26 PM

    Mahovis's Avatar

    Hi, Soren

    Actually, the sync did complete, although the error message is still there on every sync I try to make from Anki (desktop), full or not. I tried adding a test card to the collection, and after a full uploading to AnkiWeb and a full downloading in Ankidroid, the test card showed up on my tablet. The review data also seems to be correct.

  4. 4 Posted by Mahovis on 11 May, 2013 12:55 AM

    Mahovis's Avatar

    Some more info that might be useful: I tried to copy the .anki2 file from ankidroid to the anki desktop folder, and received a message about corrupt database. It wasn't even possible to close the message without anki getting automatically closed.

    None of the check database functions, from Ankidroid or Anki desktop, points to any error on the database, even before applying the sqlite solution.

    I'm using Anki 2.0.8 and Ankidroid 2.0.1.

  5. Support Staff 5 Posted by Damien Elmes on 11 May, 2013 03:28 AM

    Damien Elmes's Avatar

    You should not copy the collection.media.db file between devices. Please
    delete it and Anki will create it again.

  6. 6 Posted by Mahovis on 11 May, 2013 03:21 PM

    Mahovis's Avatar

    Hi, Damien,

    I've deleted the collection.media.db, opened Anki and the syncing problem is gone. Thank you both very much for your support and for this amazing program!

  7. 7 Posted by Soren Bjornstad on 11 May, 2013 08:08 PM

    Soren Bjornstad's Avatar

    You're welcome!

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac