bhargavchippada / forceatlas2

Fastest Gephi's ForceAtlas2 graph layout algorithm implemented for Python and NetworkX
GNU General Public License v3.0
285 stars 79 forks source link

AttributeError: module 'fa2.fa2util' has no attribute 'Node' #32

Open dmitra79 opened 3 years ago

dmitra79 commented 3 years ago

Hello,

I am getting an error below when computing positions on an rdflib graph Any ideas?

  File "c:\home\projects\SE\ConfigurationKG\se-configuration-kg\code\configuration2graph.py", line 217, in <module>
    graph_data=compute_layout(G)
  File "c:\home\projects\SE\ConfigurationKG\se-configuration-kg\code\configuration2graph.py", line 173, in compute_layout
    pos = ForceAtlas2(scalingRatio=2.0, gravity=1.0).forceatlas2_networkx_layout(G,iterations=100)  #.to_undirected(),
  File "c:\Users\dfradkin\Anaconda3\envs\kg2\lib\site-packages\fa2-0.3.5-py3.8-win-amd64.egg\fa2\forceatlas2.py", line 250, in forceatlas2_networkx_layout
  File "c:\Users\dfradkin\Anaconda3\envs\kg2\lib\site-packages\fa2-0.3.5-py3.8-win-amd64.egg\fa2\forceatlas2.py", line 162, in forceatlas2 
  File "c:\Users\dfradkin\Anaconda3\envs\kg2\lib\site-packages\fa2-0.3.5-py3.8-win-amd64.egg\fa2\forceatlas2.py", line 103, in init        
AttributeError: module 'fa2.fa2util' has no attribute 'Node'

I have python 3.8 and: networkx 2.4 py_1 rdflib 5.0.0 py38h32f6830_3 conda-forge

jacquesfize commented 3 years ago

Hi, I got the same error using Anaconda on MacOS. To answer this issue, I used the dedicated repository on Conda Forge : https://anaconda.org/conda-forge/fa2

Hope it helps !

wubaosheng commented 2 years ago

I have the same question

tangguangjue commented 2 years ago

Hi, I got the same error using Anaconda on MacOS. To answer this issue, I used the dedicated repository on Conda Forge : https://anaconda.org/conda-forge/fa2

I am using the latest version of FA2 module, but when I run the example code, the error still appears AttributeError:module 'fa2.fa2util' has no attribute 'Node' Excuse me, is there any solution?