[Bug 691185] WARNING **: expected enumeration type GstFormat, but got Format instead" when setting GstFormat property on GStreamer appsrc element

pygobject (bugzilla.gnome.org) bugzilla at gnome.org
Sat Jan 5 09:17:05 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=691185
  pygobject | gobject | 3.2.x

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
            Version|1.0.4                       |3.2.x
                 CC|                            |t.i.m at zen.co.uk
          Component|gst-python                  |gobject
         AssignedTo|gstreamer-bugs at lists.freede |nobody at pygtk.org
                   |sktop.org                   |
            Product|GStreamer                   |pygobject
     Ever Confirmed|0                           |1
          QAContact|gstreamer-bugs at lists.freede |python-bindings-maint at gnome
                   |sktop.org                   |.bugs
            Summary|Wrong type expected when    |WARNING **: expected
                   |setting GstFormat on appsrc |enumeration type GstFormat,
                   |element.                    |but got Format instead"
                   |                            |when setting GstFormat
                   |                            |property on GStreamer
                   |                            |appsrc element
   Target Milestone|HEAD                        |---

--- Comment #1 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2013-01-05 17:17:01 UTC ---
Curious, but I'm not sure if this is a bug in gst-python, rather than
gobject-introspection or pygobject.

As a work-around you can do this btw:

>>> src.set_property('format', 3)
>>> print src.get_property('format')
<enum GST_FORMAT_TIME of type GstFormat>


Stack trace for the warning:

$ G_DEBUG=fatal_warnings gdb --args python
(gdb) run
Python 2.7.3 (default, Sep  9 2012, 17:41:34) 
>>> from gi.repository import Gst
>>> Gst.init(None)
[]
>>> src=Gst.ElementFactory.make('appsrc',None)
>>> src.set_property('format', Gst.Format.TIME)

** (python:29952): WARNING **: expected enumeration type GstFormat, but got
Format instead

Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_WARNING, format=0x7ffff4176ad0
"expected enumeration type %s, but got %s instead",
args1=args1 at entry=0x7fffffffbec8)
    at
/build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmessages.h:101
101    /build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmessages.h:
No such file or directory.
(gdb) bt
#0  g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_WARNING,
format=0x7ffff4176ad0 "expected enumeration type %s, but got %s instead",
args1=args1 at entry=0x7fffffffbec8)
    at
/build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmessages.h:101
#1  0x00007ffff51ad622 in g_log (log_domain=log_domain at entry=0x0,
log_level=log_level at entry=G_LOG_LEVEL_WARNING,
format=format at entry=0x7ffff4176ad0 "expected enumeration type %s, but got %s
instead")
    at
/build/glib2.0-7fLB_j/glib2.0-2.33.12+really2.32.4/./glib/gmessages.c:792
#2  0x00007ffff4171de4 in pyg_enum_get_value (enum_type=10783648,
obj=obj at entry=<Format at remote 0xb9aaf0>, val=val at entry=0x7fffffffbfd8) at
/home/martin/debian/pkg-gnome/build-area/pygobject-3.2.2/gi/_gobject/pygtype.c:482
#3  0x00007ffff4173758 in pyg_value_from_pyobject
(value=value at entry=0x7fffffffc060, obj=obj at entry=<Format at remote 0xb9aaf0>)
at
/home/martin/debian/pkg-gnome/build-area/pygobject-3.2.2/gi/_gobject/pygtype.c:869
#4  0x00007ffff4174211 in pyg_param_gvalue_from_pyobject
(value=value at entry=0x7fffffffc060, py_obj=py_obj at entry=<Format at remote
0xb9aaf0>, pspec=0xbe1b60)
    at
/home/martin/debian/pkg-gnome/build-area/pygobject-3.2.2/gi/_gobject/pygtype.c:1698
#5  0x00007ffff416c3d1 in set_property_from_pspec (obj=0xdc6f30,
attr_name=0x7ffff7f90894 "format", pspec=<optimized out>, pvalue=<Format at
remote 0xb9aaf0>)
    at
/home/martin/debian/pkg-gnome/build-area/pygobject-3.2.2/gi/_gobject/pygobject.c:295
#6  0x00007ffff416c6d5 in pygobject_set_property (self=0xb13370,
args=<optimized out>) at
/home/martin/debian/pkg-gnome/build-area/pygobject-3.2.2/gi/_gobject/pygobject.c:1328
#7  0x00000000004b1764 in call_function (oparg=<optimized out>,
pp_stack=0x7fffffffc270) at ../Python/ceval.c:4021
#8  PyEval_EvalFrameEx (f=f at entry=Frame 0xdc7d10, for file <stdin>, line 1, in
<module> (), throwflag=throwflag at entry=0) at ../Python/ceval.c:2666
#9  0x00000000004b9158 in PyEval_EvalCodeEx (co=co at entry=0x980630,
globals=globals at entry=
    {'src': <__main__.GstAppSrc at remote 0xb13370>, 'Gst':
<DynamicModule(_overrides_module=None, _namespace='Gst',
_introspection_module=<IntrospectionModule(PluginFeature=<GObjectMeta(list_free=<staticmethod
at remote 0xbaf4b0>, get_plugin=<function at remote 0xd77050>,
__module__='gi.repository.Gst', get_rank=<function at remote 0xd77140>,
load=<function at remote 0xd771b8>, set_rank=<function at remote 0xd77230>,
check_version=<function at remote 0xbacf50>, list_debug=<staticmethod at remote
0xbaf440>, list_copy=<staticmethod at remote 0xbaf3d0>,
rank_compare_func=<staticmethod at remote 0xbaf590>, get_plugin_name=<function
at remote 0xd770c8>, __gtype__=<gobject.GType at remote 0x7ffff7f4b438>,
__info__=<ObjectInfo at remote 0xbaa8c0>, __doc__=None) at remote 0xd6f070>,
_namespace='Gst', Format=<type at remote 0xdcbd90>,
URIHandler=<GObjectMeta(__module__='gi.repository.Gst', __info__=<InterfaceInfo
at remote 0xd805a8>, get_uri=<function at remote 0xd7e500>,
get_protocols=<function at remote 0xd7e488>, set_...(truncated),
locals=locals at entry=
    {'src': <__main__.GstAppSrc at remote 0xb13370>, 'Gst':
<DynamicModule(_overrides_module=None, _namespace='Gst',
_introspection_module=<IntrospectionModule(PluginFeature=<GObjectMeta(list_free=<staticmethod
at remote 0xbaf4b0>, get_plugin=<function at remote 0xd77050>,
__module__='gi.repository.Gst', get_rank=<function at remote 0xd77140>,
load=<function at remote 0xd771b8>, set_rank=<function at remote 0xd77230>,
check_version=<function at remote 0xbacf50>, list_debug=<staticmethod at remote
0xbaf440>, list_copy=<staticmethod at remote 0xbaf3d0>,
rank_compare_func=<staticmethod at remote 0xbaf590>, get_plugin_name=<function
at remote 0xd770c8>, __gtype__=<gobject.GType at remote 0x7ffff7f4b438>,
__info__=<ObjectInfo at remote 0xbaa8c0>, __doc__=None) at remote 0xd6f070>,
_namespace='Gst', Format=<type at remote 0xdcbd90>,
URIHandler=<GObjectMeta(__module__='gi.repository.Gst', __info__=<InterfaceInfo
at remote 0xd805a8>, get_uri=<function at remote 0xd7e500>,
get_protocols=<function at remote 0xd7e488>, set_...(truncated),
args=args at entry=0x0, argcount=argcount at entry=0, kws=kws at entry=0x0,
kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, 
    closure=closure at entry=0x0) at ../Python/ceval.c:3253
#10 0x0000000000541fd3 in PyEval_EvalCode (locals=
    {'src': <__main__.GstAppSrc at remote 0xb13370>, 'Gst':
<DynamicModule(_overrides_module=None, _namespace='Gst',
_introspection_module=<IntrospectionModule(PluginFeature=<GObjectMeta(list_free=<staticmethod
at remote 0xbaf4b0>, get_plugin=<function at remote 0xd77050>,
__module__='gi.repository.Gst', get_rank=<function at remote 0xd77140>,
load=<function at remote 0xd771b8>, set_rank=<function at remote 0xd77230>,
check_version=<function at remote 0xbacf50>, list_debug=<staticmethod at remote
0xbaf440>, list_copy=<staticmethod at remote 0xbaf3d0>,
rank_compare_func=<staticmethod at remote 0xbaf590>, get_plugin_name=<function
at remote 0xd770c8>, __gtype__=<gobject.GType at remote 0x7ffff7f4b438>,
__info__=<ObjectInfo at remote 0xbaa8c0>, __doc__=None) at remote 0xd6f070>,
_namespace='Gst', Format=<type at remote 0xdcbd90>,
URIHandler=<GObjectMeta(__module__='gi.repository.Gst', __info__=<InterfaceInfo
at remote 0xd805a8>, get_uri=<function at remote 0xd7e500>,
get_protocols=<function at remote 0xd7e488>, set_...(truncated), globals=
    {'src': <__main__.GstAppSrc at remote 0xb13370>, 'Gst':
<DynamicModule(_overrides_module=None, _namespace='Gst',
_introspection_module=<IntrospectionModule(PluginFeature=<GObjectMeta(list_free=<staticmethod
at remote 0xbaf4b0>, get_plugin=<function at remote 0xd77050>,
__module__='gi.repository.Gst', get_rank=<function at remote 0xd77140>,
load=<function at remote 0xd771b8>, set_rank=<function at remote 0xd77230>,
check_version=<function at remote 0xbacf50>, list_debug=<staticmethod at remote
0xbaf440>, list_copy=<staticmethod at remote 0xbaf3d0>,
rank_compare_func=<staticmethod at remote 0xbaf590>, get_plugin_name=<function
at remote 0xd770c8>, __gtype__=<gobject.GType at remote 0x7ffff7f4b438>,
__info__=<ObjectInfo at remote 0xbaa8c0>, __doc__=None) at remote 0xd6f070>,
_namespace='Gst', Format=<type at remote 0xdcbd90>,
URIHandler=<GObjectMeta(__module__='gi.repository.Gst', __info__=<InterfaceInfo
at remote 0xd805a8>, get_uri=<function at remote 0xd7e500>,
get_protocols=<function at remote 0xd7e488>, set_...(truncated), co=0x980630)
at ../Python/ceval.c:667
#11 run_mod (mod=<optimized out>, filename=<optimized out>, globals=
    {'src': <__main__.GstAppSrc at remote 0xb13370>, 'Gst':
<DynamicModule(_overrides_module=None, _namespace='Gst',
_introspection_module=<IntrospectionModule(PluginFeature=<GObjectMeta(list_free=<staticmethod
at remote 0xbaf4b0>, get_plugin=<function at remote 0xd77050>,
__module__='gi.repository.Gst', get_rank=<function at remote 0xd77140>,
load=<function at remote 0xd771b8>, set_rank=<function at remote 0xd77230>,
check_version=<function at remote 0xbacf50>, list_debug=<staticmethod at remote
0xbaf440>, list_copy=<staticmethod at remote 0xbaf3d0>,
rank_compare_func=<staticmethod at remote 0xbaf590>, get_plugin_name=<function
at remote 0xd770c8>, __gtype__=<gobject.GType at remote 0x7ffff7f4b438>,
__info__=<ObjectInfo at remote 0xbaa8c0>, __doc__=None) at remote 0xd6f070>,
_namespace='Gst', Format=<type at remote 0xdcbd90>,
URIHandler=<GObjectMeta(__module__='gi.repository.Gst', __info__=<InterfaceInfo
at remote 0xd805a8>, get_uri=<function at remote 0xd7e500>,
get_protocols=<function at remote 0xd7e488>, set_...(truncated), locals=
    {'src': <__main__.GstAppSrc at remote 0xb13370>, 'Gst':
<DynamicModule(_overrides_module=None, _namespace='Gst',
_introspection_module=<IntrospectionModule(PluginFeature=<GObjectMeta(list_free=<staticmethod
at remote 0xbaf4b0>, get_plugin=<function at remote 0xd77050>,
__module__='gi.repository.Gst', get_rank=<function at remote 0xd77140>,
load=<function at remote 0xd771b8>, set_rank=<function at remote 0xd77230>,
check_version=<function at remote 0xbacf50>, list_debug=<staticmethod at remote
0xbaf440>, list_copy=<staticmethod at remote 0xbaf3d0>,
rank_compare_func=<staticmethod at remote 0xbaf590>, get_plugin_name=<function
at remote 0xd770c8>, __gtype__=<gobject.GType at remote 0x7ffff7f4b438>,
__info__=<ObjectInfo at remote 0xbaa8c0>, __doc__=None) at remote 0xd6f070>,
_namespace='Gst', Format=<type at remote 0xdcbd90>,
URIHandler=<GObjectMeta(__module__='gi.repository.Gst', __info__=<InterfaceInfo
at remote 0xd805a8>, get_uri=<function at remote 0xd7e500>,
get_protocols=<function at remote 0xd7e488>, set_...(truncated),
flags=<optimized out>, arena=<optimized out>) at ../Python/pythonrun.c:1365
#12 0x000000000044a395 in PyRun_InteractiveOneFlags
(fp=fp at entry=0x7ffff731b6c0, filename=filename at entry=0x57249a "<stdin>",
flags=flags at entry=0x7fffffffc4e0) at ../Python/pythonrun.c:852
#13 0x000000000044a47f in PyRun_InteractiveLoopFlags
(fp=fp at entry=0x7ffff731b6c0, filename=filename at entry=0x57249a "<stdin>",
flags=flags at entry=0x7fffffffc4e0) at ../Python/pythonrun.c:772
#14 0x000000000044aabb in PyRun_AnyFileExFlags (fp=fp at entry=0x7ffff731b6c0,
filename=filename at entry=0x57249a "<stdin>", closeit=closeit at entry=0,
flags=flags at entry=0x7fffffffc4e0) at ../Python/pythonrun.c:741
#15 0x000000000044b616 in Py_Main (argc=<optimized out>, argv=0x7fffffffc698)
at ../Modules/main.c:639
#16 0x00007ffff6fb5ead in __libc_start_main (main=<optimized out>,
argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffc688) at
libc-start.c:228
#17 0x00000000004c8d81 in _start ()


This may not be the latest version of gi/pygobject, but I didn't see any
commits in git that look like they might have fixed this (but I didn't look
very hard).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list