HyperNetX icon indicating copy to clipboard operation
HyperNetX copied to clipboard

AttributeError on attribute 'dataframe' of Hypergraph

Open LucaGherardini opened this issue 2 years ago • 2 comments

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

LucaGherardini avatar Jun 07 '23 08:06 LucaGherardini

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

bonicim avatar Jun 07 '23 21:06 bonicim

@bonicim Sure

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

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

LucaGherardini avatar Jun 09 '23 06:06 LucaGherardini

Fixed in v2.3.2

bonicim avatar Jun 06 '24 17:06 bonicim