Runing Python3.5 Kivy1.10 on supervisord

47 views
Skip to first unread message

Ivana WJ

unread,
Feb 17, 2018, 10:01:54 AM2/17/18
to Kivy users support
On Ubuntu 16.04 (latest updates installed)
I am successfully running my Python 3.5 Kivy 1.10 code from terminal and all works just fine, screen is displayed and everything works as expected.
Application is a game, and also it has videos displayed between games. All is working perfectly when run from terminal.

But, when running the same program from supervisor I am getting following error:

[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [VideoGstplayer] Using Gstreamer 1.8.3.0
[INFO   ] [Video       ] Provider: gstplayer
[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
No protocol specified
[CRITICAL] [Window      ] Unable to find any valuable Window provider.
egl_rpi - ImportError: cannot import name 'bcm'
  File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)
  File "/usr/lib/python3/dist-packages/kivy/core/window/window_egl_rpi.py", line 12, in <module>
    from kivy.lib.vidcore_lite import bcm, egl

sdl2 - RuntimeError: b'Failed to connect to the Mir Server'
  File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 67, in core_select_lib
    cls = cls()
  File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 140, in __init__
    super(WindowSDL, self).__init__()
  File "/usr/lib/python3/dist-packages/kivy/core/window/__init__.py", line 899, in __init__
    self.create_window()
  File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 269, in create_window
    self.fullscreen, resizable, state)
  File "kivy/core/window/_window_sdl2.pyx", line 84, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy/core/window/_window_sdl2.c:1998)
  File "kivy/core/window/_window_sdl2.pyx", line 57, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (kivy/core/window/_window_sdl2.c:1574)

x11 - ImportError: No module named 'kivy.core.window.window_x11'
  File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)

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

My supervisor config is:

[program:my_progname]
environment=DISPLAY=":0.0"
command=python3.5 /home/userix/my_progpath/my_progname.py
user=userix
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/my_progname.log
stdout_logfile=/var/log/supervisor/my_progname.log
priority=1


Exiting setup worked on Ubuntu 15.10 and Kivy 1.9
I have also tried adding DISPLAY in .bashrc but it didnt help
Any help is appreciated, I have a deadline on this and I am unable to make it run 
so please heeeeelp
Thank you



SPF

unread,
Feb 28, 2018, 6:01:48 PM2/28/18
to kivy-...@googlegroups.com
I can't give you a solution, but when trying to overcome an openGL problem yesterday I received the same error when I changed the Kivy variable KIVY_GL_BACKEND to a value that was not valid (dependency not installed). 

I hope that helps.

[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)

Reply all
Reply to author
Forward
0 new messages