You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cPickle has problems loading instances of gtk gobject.GEnum classes.
gobject.GEnum is a subclass of int. On the other hand pickle handles
those classes correctly. Since cPickle is meant to be a faster version
of pickle this needs to be consider a bug.
Can you please investigate the details and report the cause of the problem?
doublep commented on Feb 28, 2008
doublepmannequin
Mannequin
More actions
Using slightly modified PyGObject (so that it gives more useful error
message in pyg_enum_new) and adding 'raise' in the end of attached
example, I got this:
<enum GTK_RC_TOKEN_LOWEST of type GtkRcTokenType> <class
'gtk._gtk.RcTokenType'>
Traceback (most recent call last):
File "<stdin>", line 5, in <module>ValueError: value out of range (294 not in 0..40)
Not sure what it means yet...
doublep commented on Feb 28, 2008
doublepmannequin
Mannequin
More actions
It doesn't seem 'pickle' itself works:
>>> import pickle
>>> import gtk
>>> s = pickle.dumps (gtk.RC_TOKEN_LOWEST, pickle.HIGHEST_PROTOCOL)
>>> pickle.loads (s)
__main__:1: Warning: cannot retrieve class for invalid (unclassed) type
`<invalid>'
Activity
pyscripter commentedon Feb 28, 2008
cPickle has problems loading instances of gtk gobject.GEnum classes.
gobject.GEnum is a subclass of int. On the other hand pickle handles
those classes correctly. Since cPickle is meant to be a faster version
of pickle this needs to be consider a bug.
To test run the following script:
If you replace cPickle with pickle then the script runs fine.
loewis commentedon Feb 28, 2008
Can you please investigate the details and report the cause of the problem?
doublep commentedon Feb 28, 2008
Using slightly modified PyGObject (so that it gives more useful error
message in pyg_enum_new) and adding 'raise' in the end of attached
example, I got this:
Not sure what it means yet...
doublep commentedon Feb 28, 2008
It doesn't seem 'pickle' itself works:
** ERROR **: file pygenum.c: line 55 (pyg_enum_repr): assertion failed:
(G_IS_ENUM_CLASS(enum_class))
aborting...
Aborted
loewis commentedon Feb 29, 2008
This all look like a bug in pygtk to me, not like a bug in pickle/cPickle.
doublep commentedon Feb 29, 2008
Please close this issue. It is a PyGObject bug, nothing to do with
Python: http://bugzilla.gnome.org/show_bug.cgi?id=519645