Streaming.py is giving error

Hello,
I am trying to run the example streaming.py, but it is giving an error
The platform is RaspberryPi 4 ubuntu 22.04, python 3.9.5 and pip 21.1.1; also this is with the physical drone using Olympe 7.2 and 7.1 connected via remote controller.

Traceback (most recent call last):
  File "/home/dtadmin/code/parrot-groundsdk/src/olympe/doc/examples/streaming.py", line 21, in <module>
    from olympe.video.renderer import PdrawRenderer
  File "/home/dtadmin/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/olympe/video/renderer.py", line 8, in <module>
    from OpenGL import GLX
  File "/home/dtadmin/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/OpenGL/GLX/__init__.py", line 3, in <module>
    from OpenGL.GLX.VERSION.GLX_1_0 import *
  File "/home/dtadmin/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/OpenGL/GLX/VERSION/GLX_1_0.py", line 14, in <module>
    from OpenGL.raw.GLX.VERSION.GLX_1_0 import *
  File "/home/dtadmin/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/OpenGL/raw/GLX/VERSION/GLX_1_0.py", line 44, in <module>
    def glXChooseVisual(dpy,screen,attribList):pass
  File "/home/dtadmin/code/parrot-groundsdk/out/olympe-linux/staging/usr/lib/python/site-packages/OpenGL/raw/GLX/VERSION/GLX_1_0.py", line 13, in _f
    return _p.createFunction( function,_p.PLATFORM.GLX,'GLX_VERSION_GLX_1_0',error_checker=_errors._error_checker)
AttributeError: 'EGLPlatform' object has no attribute 'GLX'

I would highly appreciate some help.
Thank you in advance!
Best regards.
Satya

Hello All,

Somehow I am not able to edit my post, so adding more info as a reply.

Additional information is streaming.py works when I connect to the RaspberryPi using the remote desktop connection from my Windows 10 machine, but on RaspberryPi directly it gives the same error.
Also, I had to comment following four lines 55-58 otherwise it gives an error that the encoder is not found

 self.drone.streaming.set_output_files(
    video=os.path.join(self.tempd, "streaming.mp4"),
    metadata=os.path.join(self.tempd, "streaming_metadata.json"),
)

Overall it is strange, I am looking on other PI forums related to OpenGL but have had no success so far.

Also would like to know if anyone had gotten it working from a RaspberryPi in past.
I would highly appreciate any help or pointers on this.

Best regards
Satya

Hi Satya,

I ran into the same issue, and it seems that olympe does not support ubuntu 22.04
It seems to work just fine with ubuntu 20.04

Hello Marcus,

Thank you as you said It does work on ubuntu 20.04.

Best regards
Satya

This topic was automatically closed after 30 days. New replies are no longer allowed.