Hi all, In general which graph format is fastest when writing/reading graphs? I am also getting errors when I load pickled and cpickled graphs...That is something like:
"TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type unicode"
Cheers,
Anatol
On 04/29/2013 02:16 PM, Anatol Wegner wrote:
In general which graph format is fastest when writing/reading graphs?
I've never benchmarked this extensively, but I do believe that either graphml or gml should be the fastest.
I am also getting errors when I load pickled and cpickled graphs...That is something like:
"TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type unicode"
I'd need more information, such a very simple script where this happens... What python version are you using?
Cheers, Tiago
On 04/29/2013 02:27 PM, Tiago de Paula Peixoto wrote:
On 04/29/2013 02:16 PM, Anatol Wegner wrote:
In general which graph format is fastest when writing/reading graphs?
I've never benchmarked this extensively, but I do believe that either graphml or gml should be the fastest.
I am also getting errors when I load pickled and cpickled graphs...That is something like:
"TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type unicode"
I'd need more information, such a very simple script where this happens... What python version are you using?
Cheers, Tiago
graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
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
thanks for the fast reply
Anatol
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
On 04/29/2013 05:51 PM, Tiago de Paula Peixoto wrote:
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
graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
Ok, thanks.
On 04/29/2013 06:47 PM, Anatol Wegner wrote:
On 04/29/2013 05:51 PM, Tiago de Paula Peixoto wrote:
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?
Ok, thanks.
This has been fixed now in the git version...
Cheers, Tiago