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

'Graph' object has no attribute 'node' #17

Open
MagiSuCoder opened this issue Jan 1, 2020 · 2 comments
Open

'Graph' object has no attribute 'node' #17

MagiSuCoder opened this issue Jan 1, 2020 · 2 comments

Comments

@MagiSuCoder
Copy link

你好,请问运行LFM算法,报错“'Graph' object has no attribute 'node'”,是什么问题呀?

@langyayue99
Copy link

这是因为networkx不再支持G.node,现在支持方法G.nodes。

@BreezeWind-warning
Copy link

这是因为networkx不再支持G.node,现在支持方法G.nodes。

改完nodes之后还是报错。
报错为:'KeysView' object is not subscriptable

出错语句在这:
in execute(self)
7 def execute(self):
8 communities = []
----> 9 node_not_include = self._G.nodes().keys()[:]
10 while(len(node_not_include) != 0):
11 c = Community(self._G, self._alpha)

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

3 participants