-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SystemError: DBus cannot connect to the OMXPlayer process #67
Comments
Have you tried a It's odd that's happening, can you reproduce this in a minimal example? Perhaps we can figure out what's going wrong. |
Thanks for your fast answer Will My code it's similar to issue #61 I have a SystemErtor block but I don't know if it is well written because when the issue happens it doesn't enter this block. |
I'm pretty sure the DBus connection isn't being initialised, have a look at this line here: python-omxplayer-wrapper/omxplayer/player.py Line 128 in 280b32f
That's where the exception is thrown, as you can see we try to initialise a connection to DBus, could you have a look at what files are left in /tmp/ with |
I Will, pi@DIGITAL01:/tmp $ cat omxplayerdbus.pi After this I've killed the processes and run it again and all works fine. It happens randomly The errors after python call are this : pi@DIGITAL01:~/media $ Traceback (most recent call last): File "build/bdist.linux-armv6l/egg/omxplayer/player.py", line 82, in _load_sou rce File "build/bdist.linux-armv6l/egg/omxplayer/player.py", line 119, in _setup_d bus_connection File "build/bdist.linux-armv6l/egg/omxplayer/dbus_connection.py", line 23, in init |
I had similar issues and what fixed it for me was I think it had files from before I upgraded my code python3.x |
hello :) i have this code: `from time import sleep SCREEN_SAVER = '/home/pi/Videos/clip.mp4'
and i got this error: ****** ERROR: ****** DBus cannot connect to the OMXPlayer process `` my /tmp got this: my system: i didn't get 2nd dbus named --dbus_name', 'org.mpris.MediaPlayer2.omxplayer1 i also tried to remove the --dbus-name on the "player" and it still got the same error thanks :) `` |
Hello, maybe try |
i've try that before . . . even i remove that.... i also remove --dbus-name on both .. and it will play but this error appears: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.5 was not provided by any .service files my concern was the Dbus is occurring error |
this my last result tests on shell with multiple loading attempt Python 3.4.2 (default, Oct 19 2014, 13:31:11)
|
does it play the file when you run the command with the same arguments from the terminal? also have you tried to removing pause? |
yes it is normally played.... at first.. then after another .load() as i posted before .....another video file. the error will come.... and i can't play it again |
viewing On task manager (a "top command on terminal").. i've seen a lot of dbus-daemon with different pid.. |
@bhong2002 Assuming you are running an up-to-date pyhton-omxplayer wrapper, the wrapper OMXPlayer has an argument dbus_name which you need to use when you want to name your real OMXPlayer. You are setting the name through the wrapper OMXPlayer args argument. The real OMXPlayer gets that name (in your case e.g. org.mpris.MediaPlayer2.omxplayer0). The wrapper, however, is not aware of your rename request. So it tries to access the real OMXPlayer through the default name org.mpris.MediaPlayer2.omxplayer. This mismatch makes the wrapper unable to connect to the real OMXPlayer (process) resulting in the SystemError: DBus cannot connect to the OMXPlayer process. When using the wrapper OMXPlayer argument dbus_name, the wrapper will add the dbus_name to the arguments list for the real OMXPlayer. Try this:
|
hello sir @jehutting :) . . trying the above code you posted .. .. got this . . . ****** ERROR: ****** init() got an unexpected keyword argument 'dbus_name' thanks :) |
Did you update to the latest version of the python-omxplayer-wrapper? |
the omxplayer-wrapper version i am using is 0.2.3 .. is there any latest version? thanks :) |
See 60fa8fe for the dbus_name support. The version number (in setup.py) is not yet incremented, so it doesn't reflect the change. I think you need to do a new |
thanks a lot sir @jehutting 👍 . . . pulled done ... it works... i wiil post again if i got another error.. thanks again :) |
Pull request that is related in popcornmix/omxplayer |
All seems to run just fine, but randomly I'm receiving this message when I start my python application
SystemError: DBus cannot connect to the OMXPlayer process
if I kill the process and run it again it runs just fine.
Is there any way to catch the dbus connection error, so that I can kill the script and let my watchdog run it again ?
Thanks
The text was updated successfully, but these errors were encountered: