Parrot-Developers/olympe

Issue while running example streaming file. concurrent.futures._base.InvalidStateError

Closed this issue ยท 3 comments

It was working fine previously and i tested recording some videos as well. But strangely now i am facing this error on line line 748 pdraw.py. I feel like i need to reset something here. Kindly help. ๐Ÿ‘

after running this file, streaming.py

if __name__ == "__main__":
    streaming_example = StreamingExample()
    # Start the video stream
    streaming_example.start()
    streaming_example.stop()

i get the following error.

(olympe-python3) (base) kkk@kkk-GF65-Thin-10UE:~/Desktop/drone$ python olympe/streaming.py 
Olympe streaming example output dir: /tmp/olympe_streaming_test_44cb7ywv
2021-08-03 02:56:48,561 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0xa1000001
2021-08-03 02:56:48,561 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0xa2000005
2021-08-03 02:56:48,561 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0xa2000004
2021-08-03 02:56:48,561 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0xa3000004
2021-08-03 02:56:48,801 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0x9d000009
2021-08-03 02:56:48,802 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0xa5000002
2021-08-03 02:56:48,804 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id: 18 in common.CommonState
2021-08-03 02:56:48,857 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0x9f000001
2021-08-03 02:56:48,857 [WARNING] 	olympe.drone.ANAFI-F029802 - _recv_cmd_cb - Unknown message id 0xa5000001
Exception ignored on calling ctypes callback function: <function Structure.bind.<locals>.<lambda>.<locals>.<lambda> at 0x7f7718cc7a60>
Traceback (most recent call last):
  File "/home/dongo/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe_deps.py", line 81, in <lambda>
    type_((lambda callback: lambda *args: callback(*args))(
  File "/home/dongo/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/pdraw.py", line 748, in _close_resp
    self._close_resp_future.set_result(True)
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 532, in set_result
    raise InvalidStateError('{}: {!r}'.format(self._state, self))
concurrent.futures._base.InvalidStateError: FINISHED: <Future at 0x7f7718cd0730 state=finished returned bool>

I am using ubuntu 20.04 and my environment is working fine. I am still able to run other files such as photo.py. I am trying to stream but don't know how to make it work.

Please any help in this regard will be highly appreciated. thanks

solved now. Just add some delay after start stream to actually record.

Can you please explain more how you fixed this issue
if you can provide the code you used to add the delay, that would be awesome

Have you been able to reproduce this issue lately with the latest 7.X releases ? (currently the 7.4.2?)