[gstreamer-bugs] [Bug 624592] gst-python: plugin: attempt to load plugin "python" fails with KeyError

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Aug 27 11:17:33 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=624592
  GStreamer | gst-python | git

Leo Singer <lsinger> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #166052|0                           |1
        is obsolete|                            |

--- Comment #1 from Leo Singer <lsinger at caltech.edu> 2010-08-27 18:17:28 UTC ---
Created an attachment (id=168918)
 View: https://bugzilla.gnome.org/attachment.cgi?id=168918
 Review: https://bugzilla.gnome.org/review?bug=624592&attachment=168918

New patch, clearing error indicators after failed lookups in sys.modules

The KeyError occurs if you call PyMapping_GetItemString with a key that is not
in the mapping.  Because at this point "gst" has not yet been imported, this
raises an exception.

The solution was to clear the error indicator using PyErr_Clear() after each of
the two failed PyMapping_GetItemString() calls.

By the way, I am on Debian testing.  When I run "python --version", I get
"Python 2.6.6rc1+".  Is it possible that in earlier versions of Python
PyMapping_GetItemString did not raise an exception?  Or is it possible that in
earlier versions of Python PyImport_ImportModule() did not check to see if the
error indicator was set?

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