0

GstPbutils python3 モジュールを使用しようとしていますが、インポートするだけですべてが壊れます。コードは次のとおりです。

#!/usr/bin/python3

import gi
gi.require_version('GstPbutils', '1.0')
from gi.repository import GstPbutils

print('Hello World!')

そして出力:

/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!

私のディストリビューションは壊れていますか?私はそれを間違っていますか?

4

1 に答える 1

0

これらは単なる警告です。すべて正常に動作するはずですが、次のコードを使用して削除できます。

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

ソース: https://bugzilla.gnome.org/show_bug.cgi?id=736260

于 2016-07-19T16:00:13.693 に答える