Windows syncing error

Hello!
I’m using both Anki on Windows (since it’s the only way to use the Chinese Redux addon, mostly) and AnkiWeb.
There’s a problem while syncing or trying to upload database to AnkiWeb:
DbError { info: “SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file"))”, kind: Other }
I have enough space on my disk, i’ve already tried rebooting my computer, installing and uninstalling latest q5 and q6 updates, tried an older version, checked database, forced syncing, disabled addons, deleted addons, i think i’ve tried everything i found on troubleshooting, google and reddit :frowning:
Thanks for your help!

It sounds like you’ve covered most of the things we ran through on a similar report a few weeks ago – but read through that thread and try the others.

Thank you, i see. So the only thing from this thread i haven’t tried yet is creating a fresh new database and upload from AnkiWeb, but i’ve been putting it off, because i’ll miss a few decks i might have created after syncing crashed, as they don’t show up on AnkiWeb entirely.

There’s also this debug info that appears when i try troubleshooting database, maybe it might help somehow?

Anki 24.06.3 (d678e393)  
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19045

Traceback (most recent call last):
  File "aqt.taskman", line 142, in _on_closures_pending
  File "aqt.taskman", line 86, in <lambda>
  File "aqt.taskman", line 106, in wrapped_done
  File "aqt.dbcheck", line 41, in on_future_done
  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 "aqt.dbcheck", line 36, in do_check
  File "aqt.main", line 1489, in create_backup_now
  File "anki.collection", line 340, in create_backup
  File "anki._backend_generated", line 171, in create_backup
  File "anki._backend", line 171, in _run_command
anki.errors.BackendIOError: Failed to create file in 'C:\Users\kate\AppData\Local\Temp\': Access is denied. (os error 5) at path "C:\\Users\\kate\\AppData\\Local\\Temp\\.tmpW17zUF"

There might be an intermediate step that could help things on that front. You could try exporting just those specific decks (on desktop) as an apkg, with scheduling and media. You won’t really know if it is defect free until you reunite it with the rest of your collection and try to sync again, but you can at least create a temporary profile (on desktop) and import into that to make sure you can get that far. [In an abundance of caution, you might want to make a separate apkg for each deck.]

After you get your new local database built and downloaded to be in sync with AnkiWeb, you can import that apkg into your main profile.


The other option in that thread is to try to repair your database with the instructions in the manual. Or did you try that as well, and it hasn’t worked?

Okay, so i’ve been trying back and forth between different back-up files, the error “Automatic syncing and backups have been disabled while restoring. To enable them again, close the profile or restart Anki.” occured, then a photo one, though none of my notes contain photos in them.
Then i tried exporting the whole database to rewrite it all over like the thread said, the error about denied access occured, and when i runed program again as an administrator (even though i’m SURE i’ve alredy tried it before and it didn’t work), exporting, backing up and syncing all started working :sweat_smile:
Now, when i got all the decks i need on AnkiWeb, i think i’ll completely scrape everything off my computer and try reinstalling the newest version, reinstalling addons and syncing it to Ankiweb, or use my earlier export, if it fails.
Thank you so much for all your help, Danika!

1 Like

In case you’re curious, you shouldn’t need to run Anki as an administrator. The fact that doing so resolved the issue implies that your temp folder has the wrong permissions set.

2 Likes

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