SOLVED - Install problem - "Anki could not create its data folder"

Hi all,
I get the “Anki could not create its data folder” error after installation. Hoping someone can help, as I really want to use this app.

Windows 7
Anki alternate, I also tried alternate and - same result

Trying these solutions from the forum and elsewhere:

  1. SHGetASpecialFolderLocation says “CSIDL_PERSONAL My Documents Does not exist”

  2. I ran as admin: shell:UsersFilesFolder and clicked “properties” but ‘My Documents’ has no location tab and is read only. Changes to the “read only” tickbox were never permanent.

  3. I followed the instruction to run the cmd:
    type the following, hitting enter after each line, and replacing ____ (and keeping the :F part) with your username from the previous command
    cd %APPDATA%
    icacls Anki2 /grant ____:F /t

The return was only: “Successfully processed 0 files. Failed processing 0 files”

  1. cd \program files\anki & anki-console.

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.

H:\Windows\system32>cd \program files\anki & anki-console
[4052] PyInstaller Bootloader 3.x
[4052] LOADER: executable is H:\Program Files\Anki\anki-console.exe
[4052] LOADER: homepath is H:\Program Files\Anki
[4052] LOADER: archivename is H:\Program Files\Anki\anki-console.exe
[4052] LOADER: H:\Program Files\Anki\anki-console.exe contains a digital signatu
[4052] LOADER: No need to extract files to run; setting extractionpath to homepa
[4052] LOADER: SetDllDirectory(H:\Program Files\Anki)
[4052] LOADER: Already in the child - running user’s code.
[4052] LOADER: Python library: H:\Program Files\Anki\python38.dll
[4052] LOADER: Loaded functions from Python library.
[4052] LOADER: Manipulating environment (sys.path, sys.prefix)
[4052] LOADER: sys.prefix is H:\Program Files\Anki
[4052] LOADER: Pre-init sys.path is H:\Program Files\Anki\;H:\Pr
ogram Files\Anki
[4052] LOADER: Setting runtime options
[4052] LOADER: Initializing python
[4052] LOADER: Overriding Python’s sys.path
[4052] LOADER: Post-init sys.path is H:\Program Files\Anki\;H:\P
rogram Files\Anki
[4052] LOADER: Setting sys.argv
[4052] LOADER: setting sys.MEIPASS
[4052] LOADER: importing modules from CArchive
[4052] LOADER: extracted struct
[4052] LOADER: callfunction returned…
[4052] LOADER: extracted pyimod01_os_path
[4052] LOADER: callfunction returned…
[4052] LOADER: extracted pyimod02_archive
[4052] LOADER: callfunction returned…
[4052] LOADER: extracted pyimod03_importers
[4052] LOADER: callfunction returned…
[4052] LOADER: Installing PYZ archive with Python modules.
[4052] LOADER: PYZ archive: PYZ-00.pyz
[4052] LOADER: Running
[4052] LOADER: Running
[4052] LOADER: Running
[4052] LOADER: Running
[4052] LOADER: Running
[4052] LOADER: Running
[4052] LOADER: Running
[4052] LOADER: Running
Traceback (most recent call last):
File "aqt_init
.py", line 442, in _run
File “aqt\”, line 87, in init
File “aqt\”, line 393, in _setBaseFolder
File “aqt\”, line 130, in maybeMigrateFolder
File “aqt\”, line 121, 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
[4052] LOADER: OK.
[4052] LOADER: Cleaning up Python interpreter.

H:\Program Files\Anki>

Maybe try with a custom folder location -

See also:


Solved! Thanks kelciour.

I tried anki -b /path/to/anki/folder

with correct path inserted, but I get the error ‘anki is not recognised as an internal or external command.’

I then changed the shortcut path, which allowed Anki to start for the first time using:
“C:\Program Files\Anki\anki.exe” -b “C:\AnkiDataFolder”

I got an OpenGL error, but but a restart of Anki found a driver.

Thanks again for your help. Much appreciated.