I am developing a kivy app on my RaspberryPi 3 to show a gui and it is working well. When I am connected directly to the pi (HDMI) the gui is showing. When I am using VNC, there is no gui showing, just the main screen/desktop of the pi. I can do anything but showing the kivy gui. After searching a long time I know this is a known issue because kivy is using open gl and vnc is not supporting this. I tried a lot of things like using different vnc-software (RealVNC, x11vnc) or using fbcp to copy the frame buffer (https://www.github.com/tasanakorn/rpi-fbcp) or the things from this post (https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=146749) but without any effect.
My running kivy app shows:
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil,
img_gif (img_ffpyplayer ignored)
[INFO ] [Kivy ] v1.11.0.dev0, git-0471549, 20180720
[INFO ] [Python ] v3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <gl>
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'>
[INFO ] [GL ] OpenGL vendor <b'Broadcom'>
[INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <8>
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [KivyMD ] KivyMD version: 0.1.2
[INFO ] [GL ] NPOT texture support is available
Has anyone a solution for this problem? I mean it should be a well known problem because in my opinion it would be very useful to show kivy apps to screens over vnc!!
EDIT:
I solved the problem. Via RealVNC in Experimental Mode (Settings) it is possible to show the kivy app to remote pc. Unfortunately it's very laggy.
Related
i am facing this issue while trying to run my kivy ml application in PowerShell or cmd.
i have installed all kivy dependencies but still same error. also i have tried to run it in virtual environment.
(kivy_venv) PS C:\Users\thiru\Downloads\exe file> python3 main.py
[INFO ] [Logger ] Record log in C:\Users\thiru\.kivy\logs\kivy_22-01-24_7.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.3
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.1
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "C:\Users\thiru\AppData\Roaming\Python\Python39\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.9.9 (main, Jan 15 2022, 01:02:02) [MSC v.1929 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "c:\users\thiru\appdata\local\activestate\cache\cc3d5c70\python.exe"
2022-01-24 14:14:10.715828: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-01-24 14:14:10.723572: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)
[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 - ImportError: DLL load failed while importing _window_sdl2: The specified module could not be found.
File "C:\Users\thiru\AppData\Roaming\Python\Python39\site-packages\kivy\core\__init__.py", line 58, in core_select_lib
mod = __import__(name='{2}.{0}.{1}'.format(
File "C:\Users\thiru\AppData\Roaming\Python\Python39\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
[CRITICAL] [App ] Unable to get a Window, abort.
This is my first time trying to use Kivy, and I haven't been able to run a base code.
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text='Hello World')
TestApp().run()
And my error log is the following:
C:\Users\Owner\AppData\Local\Microsoft\WindowsApps\python3.9.exe C:/Users/Owner/Desktop/python/BeginnerProjects/KivyTest/main.py
[INFO ] [Logger ] Record log in
C:\Users\Owner\.kivy\logs\kivy_21-02-11_57.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.1
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "C:\Users\Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Owner\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)
[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 - ImportError: DLL load failed while importing _window_sdl2: The specified module could not be found.
File "C:\Users\Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\kivy\core\__init__.py", line 58, in core_select_lib
mod = __import__(name='{2}.{0}.{1}'.format(
File "C:\Users\Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
[CRITICAL] [App ] Unable to get a Window, abort.
Process finished with exit code 1
I've tried reinstalling Kivy, installing all the dependencies, nothing has changed these results. Does anyone have an idea on how I can fix these?
Looks like a duplicate.
I had this error when I didn't give the main file main.py name.
I'm trying to run Kivy application on my Raspberry Pi 4 but when i run it, it returns:
[CRITICAL] [Window ] Unable to find any valuable Window provider.
i used https://github.com/kivy/kivy/blob/master/doc/sources/installation/installation-rpi.rst#raspberry-pi-1-4-installation to install environment.
How to fix it?
Versions
Python: 3.7.3
OS: Raspbian GNU/Linux 10 (buster)
Kivy: v2.0.0rc1
Cython: 0.29.10
sdl2, etc. installed
My Code
#! /usr/bin/python3
import os
os.environ['KIVY_VIDEO']='ffpyplayer'
os.environ['KIVY_WINDOW'] = 'sdl2'
import kivy
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Hello world')
if __name__ == '__main__':
MyApp().run()
Result
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_20-01-30_13.txt
[INFO ] [Kivy ] v2.0.0rc1, git-Unknown, 20200130
[INFO ] [Kivy ] Installed at "/home/pi/.local/lib/python3.7/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.2.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2(['text_pango'] ignored)
[INFO ] [Window ] Provider: sdl2
[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 - RuntimeError: b''
File "/home/pi/.local/lib/python3.7/site-packages/kivy/core/__init__.py", line 70, in core_select_lib
cls = cls()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 152, in __init__
super(WindowSDL, self).__init__()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/core/window/__init__.py", line 981, in __init__
self.create_window()
File "/home/pi/.local/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 290, in create_window
self.get_gl_backend_name())
File "kivy/core/window/_window_sdl2.pyx", line 112, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
File "kivy/core/window/_window_sdl2.pyx", line 74, in kivy.core.window._window_sdl2._WindowSDL2Storage.die
[CRITICAL] [App ] Unable to get a Window, abort.
Thanks :)
I use Python 3.6 and Windows 7. Works on Windows 10 also.
this solution solve the problem in most cases :
Right click on This PC then open Properties .
Go to Advanced system settings .
Click on Environment Variables .
Click on New in User variables for --- .
Put KIVY_GL_BACKEND in Variable name .
Put angle_sdl2 in Variable value .
Restart Python .
Here is a YouTube video showing these steps : https://www.youtube.com/watch?v=ATK9w2AiDeM
If this does not fix it-
Install Visual C++ Redistributable for Visual Studio 2015 and see if that fixes it? The only other thing I can think of is the user thing you mentioned. Windows could be blocking something due to user permissions? Make sure the python you use is installed for the current user.
I would suggest that you completely uninstall kivy (including dependencies), and then make a new virtual environment and then install kivy to it and try again.
[INFO ] [Logger ] Record log in C:\Users\lenovo\.kivy\logs\kivy_19-12-02_50.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\lenovo\PycharmProjects\untitled\venv\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)]
[INFO ] [Python ] Interpreter at "C:\Users\lenovo\PycharmProjects\untitled\venv\Scripts\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored)
[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 - ImportError: DLL load failed: The specified module could not be found.
File "C:\Users\lenovo\PycharmProjects\untitled\venv\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\lenovo\PycharmProjects\untitled\venv\lib\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
[CRITICAL] [App ] Unable to get a Window, abort.
I get this error, anyone can help?
By the way I installed Kivy library trought PyCharm settings!
I have graphDB 8.0.2 running on an Ubuntu server.
I run it with /var/lib/graphdb/bin/graphdb -Xmx1224M -Xms712M &.
The graphdb process stops with no reason. I don't see any errors in the logs (see below).
What could be the reason for this ?
How can I debug this ?
I already increased the memory given to the process, but still experiments this behavior. Would even more memory solve anything ?
Thank you for your help
[INFO ] 2017-09-06 13:38:58,092 [repositories/sem-bo | o.e.r.h.s.r.TupleQueryResultView] Request for query -1311463370 is finished
[INFO ] 2017-09-06 13:38:58,097 [repositories/sem-bo | c.o.f.s.RepositoryController] POST query -2012703728
[INFO ] 2017-09-06 13:38:58,114 [repositories/sem-bo | o.e.r.h.s.r.TupleQueryResultView] Request for query -2012703728 is finished
[INFO ] 2017-09-06 13:43:43,796 [Thread-4 | c.o.g.s.GraphDB] Stopping GraphDB.
[INFO ] 2017-09-06 13:43:43,964 [localhost-startStop-2 | c.o.f.c.s.SemanticDataManagement] Shutting down current semantic location
[INFO ] 2017-09-06 13:43:44,381 [Thread-5 | c.o.t.s.i.PluginManager] Shutting down plugins (DEFAULT)...
[INFO ] 2017-09-06 13:43:44,415 [Thread-5 | c.o.t.b.AVLRepository] NumberOfStatements = 45247
[INFO ] 2017-09-06 13:43:44,415 [Thread-5 | c.o.t.b.AVLRepository] NumberOfExplicitStatements = 45089
[INFO ] 2017-09-06 13:43:44,415 [Thread-5 | c.o.t.f.GraphDBFreeSchemaRepository] Shutting down entity pool
[INFO ] 2017-09-06 13:43:49,444 [Thread-5 | c.o.t.f.GraphDBFreeSchemaRepository] Entity pool was shut down
Based on the logs the only thing that comes to mind is something sends the interrupt signal to GraphDB and it's quitting gracefully.
The recommended way to run GraphDB in the background is by adding the -d (daemonize) option, e.g. in your case /var/lib/graphdb/bin/graphdb -Xmx1224M -Xms712M -d.