How to import GstPbutils?
Question: I'm trying to use the GstPbutils python3 module, but just importing it breaks
everything, here is the code:

    
    
    #!/usr/bin/python3
    
    import gi
    gi.require_version('GstPbutils', '1.0')
    from gi.repository import GstPbutils
    
    print('Hello World!')
    

And the output:

    
    
    /usr/lib/python3/dist-packages/gi/module.py:178: Warning: g_array_append_vals: assertion 'array' failed
      g_type = info.get_g_type()
    /usr/lib/python3/dist-packages/gi/module.py:178: Warning: g_hash_table_lookup: assertion 'hash_table != NULL' failed
      g_type = info.get_g_type()
    /usr/lib/python3/dist-packages/gi/module.py:178: Warning: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
      g_type = info.get_g_type()
    Hello World!
    

Is my distribution broken? Am I doing it wrong?


Answer: Those are just warnings, everything should works fine, anyway you can remove
them using the following code:

    
    
    import sys
    sys.modules["gi.overrides.Gst"] = None
    sys.modules["gi.overrides.GstPbutils"] = None
    

Source: <https://bugzilla.gnome.org/show_bug.cgi?id=736260>

