Hi there!
I'm trying to make a Python script to detect if there is motion on set-top box or not. When there is motion the script runs ok but when the box is off this error appears:
--------------------------------------------------------------------------------------------------------------------------------------
File "/home/altran/testing/stb-tester/_stbt/core.py", line 991, in detect_motion
for frame, _ in self.frames(timeout_secs):
File "/home/altran/testing/stb-tester/_stbt/core.py", line 1221, in frames
max(10, timeout_secs), since=timestamp)
File "/home/altran/testing/stb-tester/_stbt/core.py", line 2007, in get_frame
raise UITestError(str(self.last_frame))
UITestError: gst-resource-error-quark: Resource not found. (3): Resource not found.
gstrtspsrc.c(5590): gst_rtspsrc_send (): /GstPipeline:pipeline1/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Stream Not Found
FAIL: testcases/motion_test_meo.py: UITestError: gst-resource-error-quark: Resource not found. (3): Resource not found.
gstrtspsrc.c(5590): gst_rtspsrc_send (): /GstPipeline:pipeline1/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Stream Not Found
--------------------------------------------------------------------------------------------------------------------------------------
this is the part of my code that makes de motion detection:
--------------------------------------------------------------------------------------------------------------------------------------
def _make_test(self):
print "MotionTest MAKE TEST"
for motion_result in detect_motion():
assert bool(motion_result) == motion_result.motion
if not motion_result:
self.remote.send_key_once(MeoRemote.POWER)
time.sleep(4)
self.remote.send_key_once(MeoRemote.BTN_5)
else:
self.remote.send_key_once(MeoRemote.BTN_9)
break
--------------------------------------------------------------------------------------------------------------------------------------
Can you help please?
Best regards!
--