Websocket error on connection

I am getting the following error when I connect to the drone:

2020-12-09 00:22:29,836 [ERROR]         olympe.media.ANAFI-F024534 - wrapper - Websocket callback unhandled exception
Traceback (most recent call last):
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 1444, in wrapper
    return method(self, *args, **kwds)
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 1540, in _websocket_event_cb
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 1544, in _process_event
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 1417, in _update_media_state
    not self._init_media_state()
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 1366, in _init_media_state
    media_state = self._get_all_media()
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 1666, in _get_all_media
    media_id, media = _make_media(media)
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 132, in _make_media
    resource_id, resource = _make_resource(resource)
  File "/root/code/parrot-groundsdk/packages/olympe/src/olympe/media.py", line 158, in _make_resource
    resource = ResourceInfo(**resource)
TypeError: __new__() got an unexpected keyword argument 'storage'

I am running in a docker container, and have the following ports forwarded:

  • 9988:9988/udp
  • 9300:9300
  • 36560:36560
  • 44445:44445
  • 44444:44444
  • 53246:53246
  • 53253:53253
  • 554:554
  • 5004:5004/udp
  • 55004:55004/udp
  • 5005:5005/udp
  • 55005:55005/udp
  • 54321:54321/udp
  • 2233:2233/udp
  • 43210:43210/udp

am I missing any ports?

I also ran into this problem a few weeks ago and there is a bug in Olympe. storage is missing in the ResourceInfo namedtuple

I have reported this bug to Parrot.

Good news is that you can monkey patch it until Parrot releases an updated Olympe.

olympe.media.ResourceInfo = namedtuple(
olympe.media.ResourceInfo.__new__.__defaults__ = (None,) * len(olympe.media.ResourceInfo._fields)
olympe.media.ResourceInfo.__doc__ = "Namedtuple class " + olympe.media.ResourceInfo.__doc__

I agree this is annoying. I made a patch in my docker container, which you can docker pull docker.io/djohnsonara/olympe or download the Dockerfile and patch here to build yourself.

1 Like