Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G.node is deprecated networkx v2 #3

Closed
zdk123 opened this issue May 14, 2022 · 0 comments
Closed

G.node is deprecated networkx v2 #3

zdk123 opened this issue May 14, 2022 · 0 comments

Comments

@zdk123
Copy link
Contributor

zdk123 commented May 14, 2022

The tree_transport.ipynb is failing with

File ~/Repos/FGW/lib/graph.py:187, in Graph.all_matrix_attr(self, return_invd)
    186 def all_matrix_attr(self,return_invd=False):
--> 187     d=dict((k, v) for k, v in self.nx_graph.node.items())
    188     x=[]
    189     invd={}

AttributeError: 'Graph' object has no attribute 'node'

See the relevant change in the networkx docs: https://networkx.org/documentation/stable/release/migration_guide_from_1.x_to_2.0.html
https://github.com/tvayer/FGW/blob/master/lib/graph.py#L187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant