Pyinstaller Kivy: [CRITICAL] [Window ] Unable to find any valuable Window provider

Viewed 195

I am trying to convert my kivy code to an exe and im getting this error

[CRITICAL] [Window      ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - Exception: SDL2: Unable to load image
  File "kivy\core\__init__.py", line 71, in core_select_lib
  File "kivy\core\window\window_sdl2.py", line 165, in __init__
  File "kivy\core\window\__init__.py", line 1071, in __init__
  File "kivy\core\window\window_sdl2.py", line 362, in create_window
  File "kivy\core\window\__init__.py", line 1450, in create_window
  File "kivy\graphics\instructions.pyx", line 797, in kivy.graphics.instructions.RenderContext.__init__
  File "kivy\core\image\__init__.py", line 561, in __init__
  File "kivy\core\image\__init__.py", line 754, in _set_filename
  File "kivy\core\image\__init__.py", line 460, in load
  File "kivy\core\image\__init__.py", line 223, in __init__
  File "kivy\core\image\img_sdl2.py", line 47, in load

[CRITICAL] [App         ] Unable to get a Window, abort.

I have a python file, a .kv file, some images and a zip file that needs to compiled. but i keep getting this error. I used auto-py-to-exe as well.

I have seen other questions on stack as well regarding this issue. But those answers weren't any help to me.

1 Answers

I have got the same issue and fixed it by the help of kivy's pyinstaller guide

But now when i ran the compiled exe i recieve this error.

 Traceback (most recent call last):
   File "kivy\lang\parser.py", line 553, in execute_directives
   File "<frozen importlib._bootstrap>", line 1109, in __import__
   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
   File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
   File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
 ModuleNotFoundError: No module named 'kivymd.toast'
Related