Closed gchanteloube closed 6 years ago
Hi @gchanteloube,
Thanks for the bug report. I don't have time right now to investigate this, but after my exams are finished ~3rd June I'll take a look :)
Doesnt it kill itself when the file has finished playing? which is why you can no longer make dbus calls?
@3djake is correct as it is true that the (real) OMXPlayer process kills itself when it is finished and therefore one can no longer make dbus calls.
However it is strange that the NoReply dbus exception occurs as each dbus call (command) is guarded by a _check_player_is_active
function. This function should lead to the error Process is no longer alive, can't run command.
Interesting part of @gchanteloube script is therefore the
player.quit() or player.stop() or player.playback_status()
line.
This line results in
File "/xxx/willprice/python-omxplayer-wrapper/omxplayer/player.py", line 56, in wrapped
if self._process.poll() is None:
AttributeError: 'NoneType' object has no attribute 'poll'
as quit
does (two times, one time is enough :) self._process = None
.
Removing the quit
from the line to have
player.stop() or player.playback_status()
results in
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
The stop
command terminates the real OMXPlayer, but as the stop doesn't wait for the process to be terminated (in the same way as quit
does), the playback_status
can make the call while the real OMXPlayer is terminating.
Maybe @gchanteloube can show more details of the script he is actually using.
You should just use quit
and avoid stop
completely.
Issue Report
Description
Hi. When my sound file (simple mp3) is finished, I try to stop() and quit() the player, but I receive an exception :
Thanks you!
Problem reproduction
Environment details
python-omxplayer-wrapper
0.2.2 (develop or release
python-dbus
(dpkg -s python-dbus
)1.2.0-2
python
(python --version
)2.7.9
omxplayer
(omxplayer --version
)dfea8c9