Hello,
I am using Debian and I have two versions of graph-tool available. I have a program we would like to distribute using graph-tool but it turns out that it runs fine with version graph-tool_2.2.19-1 but it does not with version 2.2.23-1.
File "process.py", line 168, in <module> main() File "process.py", line 126, in main processor.process_text((input_text, parse_tree)) File "process.py", line 100, in process_text self.reset_graph() File "process.py", line 37, in reset_graph self.graph = self.graph_builder.new_graph() File "/home/ragerri/pythoncode/corefgraph-en-opener/corefgraph/graph/graph_builder.py", line 92, in new_graph GraphWrapper.set_properties(graph=graph, graph_properties={'graph_builder': self}) File "/home/ragerri/pythoncode/corefgraph-en-opener/corefgraph/graph/utils.py", line 82, in set_properties graph.graph_properties[name][graph] = property_value TypeError: 'NoneType' object does not support item assignment
This error does not arise if I remove [graph].
However, i would like to know, if possible, when the library changed this behaviour so I could tell users of my system to install from a particular version of graph-tool to other.
Thanks!
Rodrigo
Hi,
On 04/28/2013 11:01 PM, Rodrigo Agerri wrote:
Hello,
I am using Debian and I have two versions of graph-tool available. I have a program we would like to distribute using graph-tool but it turns out that it runs fine with version graph-tool_2.2.19-1 but it does not with version 2.2.23-1.
File "process.py", line 168, in <module> main() File "process.py", line 126, in main processor.process_text((input_text, parse_tree)) File "process.py", line 100, in process_text self.reset_graph() File "process.py", line 37, in reset_graph self.graph = self.graph_builder.new_graph() File "/home/ragerri/pythoncode/corefgraph-en-opener/corefgraph/graph/graph_builder.py", line 92, in new_graph GraphWrapper.set_properties(graph=graph, graph_properties={'graph_builder': self}) File "/home/ragerri/pythoncode/corefgraph-en-opener/corefgraph/graph/utils.py", line 82, in set_properties graph.graph_properties[name][graph] = property_value TypeError: 'NoneType' object does not support item assignment
This error does not arise if I remove [graph].
However, i would like to know, if possible, when the library changed this behaviour so I could tell users of my system to install from a particular version of graph-tool to other.
The behaviour of the internal graph property maps changed exactly in version 2.2.19. Here is the commit:
http://git.skewed.de/graph-tool/commit/?id=14b91f60ce6fcb4d834b85eee49408f7b...
In the current versions, the dictionary returns the map values, not the property map object themselves, so that one does not need to keep passing the graph object as key any longer, which was redundant.
Cheers, Tiago
Thanks!
Rodrigo
On Mon, Apr 29, 2013 at 9:48 AM, Tiago de Paula Peixoto tiago@skewed.dewrote:
Hi,
On 04/28/2013 11:01 PM, Rodrigo Agerri wrote:
Hello,
I am using Debian and I have two versions of graph-tool available. I
have a program we would like to distribute using graph-tool but it turns out that it runs fine with version graph-tool_2.2.19-1 but it does not with version 2.2.23-1.
File "process.py", line 168, in <module> main() File "process.py", line 126, in main processor.process_text((input_text, parse_tree)) File "process.py", line 100, in process_text self.reset_graph() File "process.py", line 37, in reset_graph self.graph = self.graph_builder.new_graph() File
"/home/ragerri/pythoncode/corefgraph-en-opener/corefgraph/graph/graph_builder.py", line 92, in new_graph
GraphWrapper.set_properties(graph=graph,
graph_properties={'graph_builder': self})
File
"/home/ragerri/pythoncode/corefgraph-en-opener/corefgraph/graph/utils.py", line 82, in set_properties
graph.graph_properties[name][graph] = property_value
TypeError: 'NoneType' object does not support item assignment
This error does not arise if I remove [graph].
However, i would like to know, if possible, when the library changed this behaviour so I could tell users of my system to install from a particular version of graph-tool to other.
The behaviour of the internal graph property maps changed exactly in version 2.2.19. Here is the commit:
http://git.skewed.de/graph-tool/commit/?id=14b91f60ce6fcb4d834b85eee49408f7b...
In the current versions, the dictionary returns the map values, not the property map object themselves, so that one does not need to keep passing the graph object as key any longer, which was redundant.
Cheers, Tiago
-- Tiago de Paula Peixoto tiago@skewed.de
graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool