On 04/29/2013 04:18 PM, Anatol Wegner wrote:
The script:
mt=load_graph('m.xml') import pickle f=open('graph','w') pickle.dump(mt,f) f.close() g=open('graph','r') m=pickle.load(g) Traceback (most recent call last): File "<pyshell#11>", line 1, in <module> m=pickle.load(g) File "/usr/lib/python2.7/pickle.py", line 1378, in load return Unpickler(file).load() File "/usr/lib/python2.7/pickle.py", line 858, in load dispatch[key](self) File "/usr/lib/python2.7/pickle.py", line 1217, in load_build setstate(state) File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line 1789, in __setstate__ self.load(stream, "xml") File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line 1518, in load props = self.__graph.ReadFromFile("", file_name, fmt) TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type unicode
Ok, this looks like a bug. It works fine in Python 3, but I cannot test with Python 2.7 right now. Could you please put this in a ticket in the website, so that I don't forget to fix it? Cheers, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>