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'

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