kivy: Kivy: Error Unable to load image
Versions
- Python: 2.7.13
- OS: Windows 7
- Kivy: 1.9.1
- Kivy installation method:
Description
I have created a bot using chatter bot and packed it using pyinstaller. when I am trying to run the entire package in a machine where I have not done installation of Python and Kivy I am getting below error
[WARNING ] Image: Unable to load image <C:\Users\AE620~1.ARU\AppData\Local\Temp_MEI18~1\kivy_install\data\glsl\default.png> [CRITICAL ] Window: Unable to find any valuable Window provider at all! sdl2 - Exception: SDL2: Unable to load image File “Lib\site-packages\kivy\core_init_.py”, line 67, in core_select_lib File “Lib\site-packages\kivy\core\window\window_sdl2.py”, line 138, in init File “Lib\site-packages\kivy\core\window_init_.py”, line 722, in init File “Lib\site-packages\kivy\core\window\window_sdl2.py”, line 255, in create_window File “Lib\site-packages\kivy\core\window_init_.py”, line 897, in create_window File “kivy\graphics\instructions.pyx”, line 756, in kivy.graphics.instructions.RenderContext.init (kivy\graphics\instructions.c:10729) File “Lib\site-packages\kivy\core\image_init_.py”, line 512, in init File “Lib\site-packages\kivy\core\image_init_.py”, line 700, in set_filename File "Lib\site-packages\kivy\core\image_init.py", line 430, in load File “Lib\site-packages\kivy\core\image_init_.py”, line 198, in init File “Lib\site-packages\kivy\core\image\img_sdl2.py”, line 42, in load
[CRITICAL ] App: Unable to get a Window, abort. [WARNING ] stderr: Exception SystemExit: 1 in ‘kivy.properties.dpi2px’ ignored [CRITICAL ] App: Unable to get a Window, abort. [WARNING ] stderr: Exception SystemExit: 1 in ‘kivy.properties.dpi2px’ ignored [CRITICAL ] App: Unable to get a Window, abort.
I have already tried the below two fixes Fix 1: import os os.environ[‘KIVY_IMAGE’] = ‘pil,sdl2’
Fix 2: Copying the below dll file and setting environment variable libpng16-16
I am attaching the error logs. kivy_17-02-28_5.txt
Please let me know what can be done to fix this.
Code and Logs
// REPLACE ME: Paste your code and logs here, a template can be found at https://git.io/vM1id.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (8 by maintainers)
@tshirtman For my situation, after
added to .spec file, build woks on that machine, just for the record.
Thanks a lot.