You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed to retrieve attributes of the nodes, edges and a graph to be displayed with Graphviz utility (migrated from Trac #610) #601
I used the NetworkX package to simulate a network of the applications (Thank you for the nice package!). I found an issue, when I tried to display the graph and the attributes of the nodes and edges with Graphviz package.
Technically, it does not matter what package I used for visualization, because you can see the bug if you build a graph, add some attributes to the graph, nodes, edges and use 'write_dot' function to save the graph data in a readable format. I was not able to see any attributes, which I added earlier.
This bug is related to the following lines in 'to_pydot(...) function of 'networkx-1.5\networkx\drawing\nx_pydot.py' file:
The commented lines are the ones, presented in the current version of the code. The following lines fix this bug. I believe, the original code was trying to retrieve the attributes of the attributes with the same name (for example, it was trying to find a "graph" attribute in the list of the "N.graph" attributes.
The updated version of the code works as expected.
Please, shoot me a line if you decide to update the code and move it to "production" version. I would like other developers to get the updated version of the code from your site.
You are right that the default attributes are not working correctly. I updated the code to use the more current style of pydot attribute handling. Can you test it to make sure that works correctly?
Comment in Trac by Aric Hagberg <aric.hagberg, 2011-07-31
In [fb34850/networkx]:
'''
#!CommitTicketReference repository="networkx" revision="fb34850c5a12a90519c8bba81dafe8382c82dc46"
Stringify graph name for pydot. Catch missing default attributes since pydot adds blank lines in the dot file otherwise.
Addresses #610
'''
Activity
networkx-trac commentedon Jul 20, 2012
Comment in Trac by Aric Hagberg <aric.hagberg, 2011-07-28
In [10b0797/networkx]:
'''
#!CommitTicketReference repository="networkx" revision="10b0797f9fb615eabe7fbba18c8e5c777c1c01c3"
Update pydot interface to use newer attribute handling style.
Addresses #610
'''
networkx-trac commentedon Jul 20, 2012
Comment in Trac by @hagberg, 2011-07-28
You are right that the default attributes are not working correctly. I updated the code to use the more current style of pydot attribute handling. Can you test it to make sure that works correctly?
networkx-trac commentedon Jul 20, 2012
Comment in Trac by Aric Hagberg <aric.hagberg, 2011-07-31
In [fb34850/networkx]:
'''
#!CommitTicketReference repository="networkx" revision="fb34850c5a12a90519c8bba81dafe8382c82dc46"
Stringify graph name for pydot. Catch missing default attributes since pydot adds blank lines in the dot file otherwise.
Addresses #610
'''
networkx-trac commentedon Jul 20, 2012
Comment in Trac by @hagberg, 2011-07-31