the graph becomes non-existent
When I create a graph like this: self.graph = Graph(directed=True) self.is_on = self.graph.new_vertex_property("boolean") and want to use it in another class method: self.is_on.set_value(False) I get the error: libcore.set_vertex_property(g._Graph__graph, _prop("v", g, self), val) AttributeError: 'NoneType' object has no attribute '_Graph__graph' -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Am 24.02.20 um 17:15 schrieb admweiss:
When I create a graph like this:
self.graph = Graph(directed=True) self.is_on = self.graph.new_vertex_property("boolean")
and want to use it in another class method:
self.is_on.set_value(False)
I get the error: libcore.set_vertex_property(g._Graph__graph, _prop("v", g, self), val) AttributeError: 'NoneType' object has no attribute '_Graph__graph'
This seems like a bug somewhere else in your program, as the following works just fine: graph = Graph(directed=True) graph.add_vertex(100) is_on = graph.new_vertex_property("boolean") is_on.set_value(False) Please remember to provide *minimal* and *self-contained* code that shows the problem, not code snippets or vague descriptions, as those cannot be reproduced. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
admweiss -
Tiago de Paula Peixoto