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:


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)
   is_on = graph.new_vertex_property("boolean")

Please remember to provide *minimal* and *self-contained* code that
shows the problem, not code snippets or vague descriptions, as those
cannot be reproduced.