Anki won’t start at all (qt5)

Hello all,

I recently heard about this software and decided to try it out so I downloaded the program and try to run it but the program won’t start at all.
Here is the info from the console

[11984] PyInstaller Bootloader 3.x
[11984] LOADER: executable is C:\Program Files\Anki\anki-console.exe
[11984] LOADER: homepath is C:\Program Files\Anki
[11984] LOADER: _MEIPASS2 is NULL
[11984] LOADER: archivename is C:\Program Files\Anki\anki-console.exe
[11984] LOADER: C:\Program Files\Anki\anki-console.exe contains a digital signature
[11984] LOADER: No need to extract files to run; setting extractionpath to homepath
[11984] LOADER: SetDllDirectory(C:\Program Files\Anki)
[11984] LOADER: Already in the child - running user's code.
[11984] LOADER: Python library: C:\Program Files\Anki\python38.dll
[11984] LOADER: Loaded functions from Python library.
[11984] LOADER: Manipulating environment (sys.path, sys.prefix)
[11984] LOADER: sys.prefix is C:\Program Files\Anki
[11984] LOADER: Pre-init sys.path is C:\Program Files\Anki\base_library.zip;C:\Program Files\Anki
[11984] LOADER: Setting runtime options
[11984] LOADER: Initializing python
[11984] LOADER: Overriding Python's sys.path
[11984] LOADER: Post-init sys.path is C:\Program Files\Anki\base_library.zip;C:\Program Files\Anki
[11984] LOADER: Setting sys.argv
[11984] LOADER: setting sys._MEIPASS
[11984] LOADER: importing modules from CArchive
[11984] LOADER: extracted struct
[11984] LOADER: callfunction returned...
[11984] LOADER: extracted pyimod01_os_path
[11984] LOADER: callfunction returned...
[11984] LOADER: extracted pyimod02_archive
[11984] LOADER: callfunction returned...
[11984] LOADER: extracted pyimod03_importers
[11984] LOADER: callfunction returned...
[11984] LOADER: Installing PYZ archive with Python modules.
[11984] LOADER: PYZ archive: PYZ-00.pyz
[11984] LOADER: Running pyiboot01_bootstrap.py
[11984] LOADER: Running pyi_rth_win32comgenpy.py
[11984] LOADER: Running pyi_rth_multiprocessing.py
[11984] LOADER: Running pyi_rth_certifi.py
[11984] LOADER: Running pyi_rth_pyqt5.py
[11984] LOADER: Running pyi_rth_pkgres.py
[11984] LOADER: Running pyi_rth_pyqt5webengine.py
[11984] LOADER: Running runanki.py

I have tried everything, qt6 works and qt5 does not and I need qt5.

I have tried even the Python there I do get this error:

Traceback (most recent call last):
  File "C:\python\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\python\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\anki-venv\scripts\anki.exe\__main__.py", line 4, in <module>
  File "c:\anki-venv\lib\site-packages\aqt\__init__.py", line 15, in <module>
    import anki.lang
  File "c:\anki-venv\lib\site-packages\anki\lang.py", line 12, in <module>
    import anki._backend
  File "c:\anki-venv\lib\site-packages\anki\_backend\__init__.py", line 15, in <module>
    from anki import backend_pb2, i18n_pb2
  File "c:\anki-venv\lib\site-packages\anki\backend_pb2.py", line 33, in <module>
    _descriptor.EnumValueDescriptor(
  File "c:\anki-venv\lib\site-packages\google\protobuf\descriptor.py", line 796, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

https://faqs.ankiweb.net/when-problems-occur.html

I have tried everything from that article, sadly it did not solve my problem.

Please paste the console output when you tried running with the latest Anki version.

The latest version qt6 works.
But latest qt5 does not work, that screenshot is form that version.

The text you posted above indicates you’re using a sub-2.1.50 version of Anki. Please paste the error you get with the latest version.

Anki starting...
Initial setup...
Running with temporary Qt5 compatibility shims.
Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "aqt", line 46, in <module>
  File "aqt.gui_hooks", line 11, in <module>
  File "_aqt.hooks", line 18, in <module>
  File "aqt.qt", line 20, in <module>
  File "aqt.qt.qt5_compat", line 15, in <module>
ImportError: DLL load failed while importing QtCore: The specified module could not be found.
Press any key to continue . . .

That seems to imply a .dll file is missing; maybe a system one that Qt depends on. You may be able to glean more info with a tool like dependency walker, but I’m afraid it’s not something I can help you with. If it turns out to be a Qt bug, it’s not going to get fixed, as Qt 5 is no longer being developed.

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