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

cora.py文件里的第85行报错:“AttributeError: 'Graph' object has no attribute 'adjacency_list'“ #45

Open
shuqincao opened this issue Apr 12, 2022 · 1 comment

Comments

@shuqincao
Copy link

No description provided.

@cbhua
Copy link

cbhua commented Apr 18, 2022

This is because the version of networkx used in this repo is a bit out of date, which is 1.11.

If you are using the version later than 2.0, you may change the edge_list = G.adjacency_list() in datasets/cora.py, line 85 to edge_list = G.adjacency().

The method adjacency_list() now is replaced by adjacency(). You may refer to this Link.

The following methods have changed:

Graph/MultiGraph
G.nodes()
G.edges()
G.neighbors()
G.adjacency_list() and G.adjacency_iter() to G.adjacency()
G.degree()
G.subgraph()
G.copy()
G.__class__() should be replaced with G.fresh_copy()

Actually, after you fix this problem, you still have to do some work on the following code debug, since the return format of this method is also changed.

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