BGL python bindings: pickling broken by graph property attribute change
Hi,
Sorry to find another bug when I know you're busy. :(
I guess this was broken when the graph property attributes were
renamed/refactored:
import boost.graph as bgl
import pickle
g = bgl.Graph()
p = g.add_vertex_property( 'prop', 'float' )
pickle.dump( g, open( 'graph.pickle', 'w' ) )
pickle.load( open( 'graph.pickle', 'r' ) )
raises the following error:
1368
1369 def load(file):
-> 1370 return Unpickler(file).load()
1371
1372 def loads(str):
c:\apps\Python25\lib\pickle.py in load(self)
856 while 1:
857 key = read(1)
--> 858 dispatch[key](self)
859 except _Stop, stopinst:
860 return stopinst.value
c:\apps\Python25\lib\pickle.py in load_build(self)
1215 setstate = getattr(inst, "__setstate__", None)
1216 if setstate:
-> 1217 setstate(state)
1218 return
1219 slotstate = None
On May 2, 2007, at 4:31 AM, John Reid wrote:
I guess this was broken when the graph property attributes were renamed/refactored:
import boost.graph as bgl import pickle g = bgl.Graph() p = g.add_vertex_property( 'prop', 'float' ) pickle.dump( g, open( 'graph.pickle', 'w' ) ) pickle.load( open( 'graph.pickle', 'r' ) )
raises the following error: [snip]
Oops, thank you for the report. I've fixed this in Subversion. - Doug
participants (2)
-
Doug Gregor
-
John Reid