marioangst / motifr

Motif analysis in multi-level networks
https://marioangst.github.io/motifr/
Other
13 stars 2 forks source link

Error: AttributeError: module 'networkx' has no attribute 'from_numpy_matrix' #70

Closed lilianemanny closed 1 year ago

lilianemanny commented 1 year ago

I am trying to use your motifr package once again, and I struggle with some motifr functions, which do not seem to run and just give the following error: "AttributeError: module 'networkx' has no attribute 'from_numpy_matrix'".

Could this be due to releases of newer versions of the 'networkx' package in Python? (currently 'networkx 3.0') If yes, do you know how I can resolve this issue? I have already tried downgrading the networkx package, but didn't seem to work...

Thanks a lot!

tseppelt commented 1 year ago

Hi @lilianemanny, I've removed the single call to networkx.from_numpy_matrix from the Python package. Please update to sma version 2.3.4 using motifr::update_motifr(). I hope this resolves the problem. Thanks for noticing this!

lilianemanny commented 1 year ago

Perfect, thanks so much @tseppelt for this very quick help! It works now :)