pnnl / HyperNetX

Python package for hypergraph analysis and visualization.
https://hypernetx.readthedocs.io
Other
500 stars 86 forks source link

AttributeError on attribute 'dataframe' of Hypergraph #112

Closed LucaGherardini closed 4 weeks ago

LucaGherardini commented 1 year ago

Hello, I've recently started to use hypernetx and I found the following error if I try to access the dataframe associated with a Hypergraph. I simply created an instance 'H' of the Hypergraph class and added a multiedge. When I try to access it through 'H.dataframe', the python interpreter returns:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/hypernetx/classes/hypergraph.py", line 588, in dataframe
    return self._dataframe
AttributeError: 'Hypergraph' object has no attribute '_dataframe'. Did you mean: 'dataframe'?

I have installed the last version of hypernetx available (hypernetx-2.0.0.post1) for python 3.10.8

bonicim commented 1 year ago

@LucaGherardini Can you please paste the exact commands you ran so that I can reproduce the error on my end? Thanks in advance.

LucaGherardini commented 1 year ago

@bonicim Sure

import hypernetx as hnx
H = hnx.Hypergraph()
H.dataframe

The response to the last command is the traceback I previously posted.

bonicim commented 4 weeks ago

Fixed in v2.3.2