SwissText Shared Task on Hierarchical Patent Classification Forum

Go back to competition Back to thread list Post in this thread

> error with the networkx


I try running the baseline with requirements.txt dependencies installed. But getting error with the nerworkx library.
"AttributeError: 'DiGraph' object has no attribute 'node'"
Has anyone else ecountered the similar error and any resolution you found?

Posted by: subhashpujari @ Feb. 12, 2020, 7:24 a.m.


Can you post the entire error message?
It could be that it needs to be changed to nodes:

>>> G.add_node(1, time='5pm')
>>> G.add_nodes_from([3], time='2pm')
>>> G.nodes[1]
{'time': '5pm'}

Posted by: benf @ Feb. 12, 2020, 7:55 a.m.

Ok I could reproduce that, it is an error on sklearn-hiearachical-classification library (my code part...).
I fixed it, if you reinstall it should work:
pip install -U git+

Thank you for reporting, and have fun with the competition!


Posted by: benf @ Feb. 12, 2020, 8:11 a.m.
Post in this thread