Gst-python fails to import on FRDM-IMX95 walnascar (Python3.13)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Gst-python fails to import on FRDM-IMX95 walnascar (Python3.13)

342 Views
ha1234
Contributor I

Trying to import gst-python (`from gi.repository import Gst`) results in a RuntimeError:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from gi.repository import Gst; import sys;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "/usr/lib/python3.13/site-packages/gi/importer.py", line 147, in create_module
    dynamic_module = load_overrides(introspection_module)
  File "/usr/lib/python3.13/site-packages/gi/overrides/__init__.py", line 98, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/gi/overrides/Gst.py", line 989, in <module>
    real_functions = [o for o in inspect.getmembers(Gst) if isinstance(o[1], type(Gst.init))]
                                 ~~~~~~~~~~~~~~~~~~^^^^^
  File "/usr/lib/python3.13/inspect.py", line 624, in getmembers
    return _getmembers(object, predicate, getattr)
  File "/usr/lib/python3.13/inspect.py", line 602, in _getmembers
    value = getter(object, key)
  File "/usr/lib/python3.13/site-packages/gi/module.py", line 204, in __getattr__
    wrapper = info.get_value()
RuntimeError: unable to get value

Has anyone else seen this issue? Unfortunately I can't go back to scarthgap as there isn't board support for the FRDM EVK. For clarity this is using a custom image using the imx-6.12.49-2.2.0 manifest

Labels (2)
Tags (3)
0 Kudos
Reply
1 Reply

278 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @ha1234,

Thank you for contacting NXP Support!

GStreamer’s Python bindings (gst-python / PyGObject) do not yet fully support Python 3.13.
The failure occurs inside the gi.overrides.Gst GObject Introspection layer, not in user code.


As a workaround, it is necessary to downgrade the Python version used in the system.
In embedded Linux systems built with Yocto, this can be done by rebuilding the image and explicitly selecting a supported Python version (e.g. Python 3.12) in local.conf.


This ensures compatibility with PyGObject and allows from gi.repository import Gst to work correctly at runtime.

 

Best Regards,
Alejandro Garcia

0 Kudos
Reply