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.
Thanks!
Dave

Windows 7
Anki 2.1.3.2 alternate, I also tried 2.1.3.5 alternate and 2.1.1.5 - 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: _MEIPASS2 is NULL
[4052] LOADER: archivename is H:\Program Files\Anki\anki-console.exe
[4052] LOADER: H:\Program Files\Anki\anki-console.exe contains a digital signatu
re
[4052] LOADER: No need to extract files to run; setting extractionpath to homepa
th
[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\base_library.zip;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\base_library.zip;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 pyiboot01_bootstrap.py
[4052] LOADER: Running pyi_rth_multiprocessing.py
[4052] LOADER: Running pyi_rth_win32comgenpy.py
[4052] LOADER: Running pyi_rth_certifi.py
[4052] LOADER: Running pyi_rth_pyqt5.py
[4052] LOADER: Running pyi_rth_pyqt5webengine.py
[4052] LOADER: Running pyi_rth_pkgres.py
[4052] LOADER: Running runanki.py
Traceback (most recent call last):
File "aqt_init
.py", line 442, in _run
File “aqt\profiles.py”, line 87, in init
File “aqt\profiles.py”, line 393, in _setBaseFolder
File “aqt\profiles.py”, line 130, in maybeMigrateFolder
File “aqt\profiles.py”, line 121, in _oldFolderLocation
File “aqt\winpaths.py”, line 163, in get_personal
File “aqt\winpaths.py”, line 105, in _get_path_buf
File “aqt\winpaths.py”, 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 - https://docs.ankiweb.net/#/files?id=startup-options

See also: https://anki.tenderapp.com/discussions/ankidesktop/38165-anki-wont-start-cannot-create-data-folder#comment_48018206

2 Likes

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.

Dave