Kivy error - Unable to get a window, abort

2024/10/14 18:16:42

I installed kivy on my Raspberry pi3, where i run a python program that already works on another pi3.

I now am trying to install the same thing on this second pi, and it doesn't work...maybe I forgot something, but i think i did all the same steps as before..

kivy is well installed indeed, as other packages for the python program.

here below the error:

pi@raspberrypi:~ $ python pi4.py
[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_17-01-19_4.txt
[INFO   ] [Kivy        ] v1.9.2-dev0
[INFO   ] [Python      ] v2.7.9 (default, Sep 17 2016, 20:26:04) 
[GCC 4.9.2]
[INFO   ] [Factory     ] 193 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Window      ] Provider: egl_rpi
[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
[CRITICAL] [Window      ] Unable to find any valuable Window provider.
egl_rpi - TypeError: 'NoneType' object has no attribute '__getitem__'File "/usr/local/lib/python2.7/dist-packages/kivy/core/__init__.py", line 67, in core_select_libcls = cls()File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 817, in __init__super(WindowBase, self).__init__(**kwargs)File "kivy/_event.pyx", line 273, in kivy._event.EventDispatcher.__init__ (/tmp/pip-IRRRCt-build/kivy/_event.c:5375)File "kivy/properties.pyx", line 423, in kivy.properties.Property.__set__ (/tmp/pip-IRRRCt-build/kivy/properties.c:5171)File "kivy/properties.pyx", line 1416, in kivy.properties.AliasProperty.set (/tmp/pip-IRRRCt-build/kivy/properties.c:23280)File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 701, in _set_topself._set_window_pos(pos[0], value)sdl2 - RuntimeError: Couldn't find matching GLX visualFile "/usr/local/lib/python2.7/dist-packages/kivy/core/__init__.py", line 67, in core_select_libcls = cls()File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 139, in __init__super(WindowSDL, self).__init__()File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 841, in __init__self.create_window()File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 263, in create_windowself.fullscreen, resizable, state)File "kivy/core/window/_window_sdl2.pyx", line 142, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (/tmp/pip-IRRRCt-build/kivy/core/window/_window_sdl2.c:2458)File "kivy/core/window/_window_sdl2.pyx", line 57, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (/tmp/pip-IRRRCt-build/kivy/core/window/_window_sdl2.c:1569)x11 - ImportError: No module named window_x11File "/usr/local/lib/python2.7/dist-packages/kivy/core/__init__.py", line 59, in core_select_libfromlist=[modulename], level=0)[CRITICAL] [App         ] Unable to get a Window, abort.
Answer

You should be able to fix this for now by running

sudo apt-get install \ libsdl2-2.0-0 \ libsdl2-image-2.0-0 \ libsdl2-mixer-2.0-0 \ libsdl2-ttf-2.0-0
https://en.xdnf.cn/q/117926.html

Related Q&A

Selenium 3.0.2 error with Firefox 50: executable may have wrong permissions

Im trying to use Selenium 3.0.2 with Firefox 50.0.1 in Windows 7. Ive followed the instructions in this post to setup correctly the driver and the paths but Im getting the following error: Traceback (m…

Convert a jpg to a list of lists

Im trying to figure out how to convert a jpg into a list of lists (using python 3.2.3) such that:[ [red,blue,red,etc..], #line1 [blue,red,yellow, etc...], #line2 [orange,yellow,black,et…

TypeError: No to_python (by-value) converter found for C++ type

Im trying to expose my C++ Classes to Python using Boost.Python. Here is a simplyfied version of what Im trying to do:struct Base {virtual ~Base() {};virtual char const *Hello() {printf("Base.Hell…

USB interface in Python

I have this (http://www.gesytec.de/en/download/easylon/p/16/) USB device connected to my Win7. I am just trying to read the vendor ID and product ID. I have Python 2.7.Here is the code,import usb busse…

Django M2M Through extra fields with multiple models

Im trying to figure out the best way to set up the following django model (genericised for security reasons).ThingA:User(M2M through "UserRelation")ThingB:User(M2M through "UserRelation&…

Openpyxl: Worksheet object has no attribute values

My goal is to read in an excel file and view the codes in a pandas dataframe (i.e. = A3) rather than the resulting values from excel executing the codes, which is the pandas default if read in using pa…

Calculation of Contact/Coordination number with Periodic Boundary Conditions

I have data for N atoms including the radius of each atom, the position of each atom and the box dimensions. I want to calculate the number of atoms each atom is in contact with and store the result. T…

how can I export multiple images using zipfile and urllib2

I am trying to add multiple image files into my zip. I have searched around and knows how to add a single one. I tried to loop through multiple images then write into it but it didnt work. I kind of d…

XPATH for Scrapy

So i am using SCRAPY to scrape off the books of a website. I have the crawler working and it crawls fine, but when it comes to cleaning the HTML using the select in XPATH it is kinda not working out ri…

Kivy Removing elements from a Stack- / GridLayout

I made a pop-up. It is basically some rows of options (max. 5 rows).If I press the + button, there will be a new line of options.If I press the - button the last row should diasappear. Unfortunatelly i…