Hi Sebastian, On 03/16/2011 08:46 AM, Sebastian Weber wrote:
RuntimeError: Pickling of "graph_tool.libgraph_tool_core.Vertex" instances is not enabled (http://www.boost.org/libs/python/doc/v2/pickle.html)
I thought graph-tool graphs are compatible with Python pickle-stuff - or do I have to watch out somewhere?
You can only pickle Graph objects, not Vertex or Edge objects. PropertyMaps can only be pickled if they are made "internal" to the graph, by storing them in the appropriate "*_properties" dictionary of a Graph object. If you want to pickle vertex or edges, you have to convert them to ints or tuple of ints, respectively, and then recover them later with the Graph.vertex() and Graph.edge() function. Cheers, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>