Anki could not create its data folder

I have suddenly been unable to open anki on my windows 10 desktop. I keep getting an error saying “Anki could not create its data folder. Please see the File Locations section of the manual, and ensure that location is not read-only.”
I have tried uninstalling anki and reinstalling but it still gives the same message.
I’ve looked at the file location and everything seems to have the ability to read an write. With some googling I’ve tried renaming that folder within my app data from anki2 to just anki but I’ve seen no change in the behavior when opening anki.
I’m unable to figure out what I did to cause this issue. I don’t remember doing anything besides not using it on my desktop for a couple of weeks

Do you use a third-party antivirus program?

so far it’s only windows defender

I presume your disk is not full? Do you use OneDrive? Does starting anki-console.exe reveal anything?

1 Like

You can also check if the data folder already exists. (

If it does exists, it could corrupted file permissions. Then, a easy solution would be to delete it and let Anki recreate.

I do use onedrive but not on the drive that anki is installed on. Everything about anki should be on the drive that doesn’t use onedrive
and my drive is not full
this is the result I get back in my console when I follow that link

[21052] PyInstaller Bootloader 3.x
[21052] LOADER: executable is C:\Program Files\Anki\anki-console.exe
[21052] LOADER: homepath is C:\Program Files\Anki
[21052] LOADER: archivename is C:\Program Files\Anki\anki-console.exe
[21052] LOADER: C:\Program Files\Anki\anki-console.exe contains a digital signature
[21052] LOADER: No need to extract files to run; setting extractionpath to homepath
[21052] LOADER: SetDllDirectory(C:\Program Files\Anki)
[21052] LOADER: Already in the child - running user’s code.
[21052] LOADER: Python library: C:\Program Files\Anki\python38.dll
[21052] LOADER: Loaded functions from Python library.
[21052] LOADER: Manipulating environment (sys.path, sys.prefix)
[21052] LOADER: sys.prefix is C:\Program Files\Anki
[21052] LOADER: Pre-init sys.path is C:\Program Files\Anki\;C:\Program Files\Anki
[21052] LOADER: Setting runtime options
[21052] LOADER: Initializing python
[21052] LOADER: Overriding Python’s sys.path
[21052] LOADER: Post-init sys.path is C:\Program Files\Anki\;C:\Program Files\Anki
[21052] LOADER: Setting sys.argv
[21052] LOADER: setting sys.MEIPASS
[21052] LOADER: importing modules from CArchive
[21052] LOADER: extracted struct
[21052] LOADER: callfunction returned…
[21052] LOADER: extracted pyimod01_os_path
[21052] LOADER: callfunction returned…
[21052] LOADER: extracted pyimod02_archive
[21052] LOADER: callfunction returned…
[21052] LOADER: extracted pyimod03_importers
[21052] LOADER: callfunction returned…
[21052] LOADER: Installing PYZ archive with Python modules.
[21052] LOADER: PYZ archive: PYZ-00.pyz
[21052] LOADER: Running
[21052] LOADER: Running
[21052] LOADER: Running
[21052] LOADER: Running
[21052] LOADER: Running
[21052] LOADER: Running
[21052] LOADER: Running
[21052] LOADER: Running
Traceback (most recent call last):
File "aqt_init
.py", line 430, in _run
File “aqt\”, line 86, in init
File “aqt\”, line 392, in _setBaseFolder
File “aqt\”, line 129, in maybeMigrateFolder
File “aqt\”, line 120, in _oldFolderLocation
File “aqt\”, line 163, in get_personal
File “aqt\”, line 105, in _get_path_buf
File “aqt\”, line 89, in _err_unless_zero
aqt.winpaths.WinPathsException: Failed to retrieve windows path: -2147024893
[21052] LOADER: OK.
[21052] LOADER: Cleaning up Python interpreter.

I deleted the anki2 folder but it still give the same message when I try to start anki again

Please see

My issue seemed to be where my system32 was looking for particular folder locations

your link in addition to this reddit post helped me solve it

1 Like

Thanks for posting the link; glad you were able to resolve the issue.

hi i have gotten the same error message as KikyoPorter and was wondering if you could explain to me what i should do to fix it?

Thanks in advance.