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

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

Closed
Aaron1993 opened this issue Jan 13, 2021 · 2 comments
Closed

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

Aaron1993 opened this issue Jan 13, 2021 · 2 comments

Comments

@Aaron1993
Copy link

Hi. Yifan, when I run the code, there is a error:AttributeError: 'Graph' object has no attribute 'node' in such file: utils.py line 23: if not 'val' in G.node[node] or not 'test' in G.node[node]:, would you please tell me how to solve it? Thanks.

@yifan-h
Copy link
Owner

yifan-h commented Jan 13, 2021

Hi there,

This error is caused by the version of "networkx". You can change the code from "G.node[node]" to "G.nodes[node]", or you can degrade networkx to an older version.

@Aaron1993
Copy link
Author

Thanks for your prompt reply.

@yifan-h yifan-h closed this as completed Jan 13, 2021
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

2 participants