Skip to content

g.del_edge(e) failed but e is indeed in g.edges() #109

@GoogleCodeExporter

Description

@GoogleCodeExporter
The nodes of my graph is a set of tuples, e.g., (1.2, 3), (2, 4.5)
Basically, here's the bit of code that tries to delete some edge:

for edge in g.edges():
    if test(edge): 
        g.del_edge(edge)
# the test function does not alter the structure of the graph

At some point, the 3rd line throws an exception:

File "/home/blurrcat/PycharmProjects/pathPlan/world.py", line 234, in add_dobs
     self.g.del_edge(e1)
   File "/usr/local/lib/python2.7/dist-packages/pygraph/classes/graph.py", line 178, in del_edge
     self.node_neighbors[u].remove(v)
 ValueError: list.remove(x): x not in list

When I catch the excetpion in debug mode, I can see that `edge in g.edges()` is 
True, but `g.has_edge(edge)` is False. There must be some integrity errors..


I'm using Pygraph 1.8.1, python 2.7, Ubuntu 12.04

Original issue reported on code.google.com by blurr...@gmail.com on 27 Jun 2012 at 6:35

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions