Hello,
I got this error when trying to save a graph to a file:
Traceback (most recent call last):
File "/usr/local/bin/graphanalyze.py", line 123, in <module>
network.save(outFN)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/__init__.py",
line 1443, in save
self.__graph.WriteToFile(file_name, None, fmt, props)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/io.py",
line 62, in pickler
pickle.dump(obj, sstream, -1)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 1370, in dump
Pickler(file, protocol).dump(obj)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 224, in dump
self.save(obj)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 600, in save_list
self._batch_appends(iter(obj))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 633, in _batch_appends
save(x)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 548, in save_tuple
save(element)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 306, in save
rv = reduce(self.proto)
RuntimeError: Pickling of "graph_tool.libgraph_tool_core.Edge"
instances is not enabled
(http://www.boost.org/libs/python/doc/v2/pickle.html)
my code is:
filename = basename(outputFile) + '_' + str(cutoff) + '.xml.gz'
network.save(filename)