Telecominfraproject / oopt-gnpy

Optical Route Planning Library, Based on a Gaussian Noise Model
http://telecominfraproject.com
BSD 3-Clause "New" or "Revised" License
198 stars 87 forks source link

TypeError: draw_networkx_nodes() got an unexpected keyword argument 'figure' #391

Closed caffery-chen closed 3 years ago

caffery-chen commented 3 years ago

Describe the bug gnpy-transmisson-example --plot got following error:

line 29, in plot_baseline plot = draw_networkx_nodes(network, nodelist=network.nodes(), node_color='#ababab', **kwargs) TypeError: draw_networkx_nodes() got an unexpected keyword argument 'figure'

To Reproduce gnpy-transmisson-example --plot

ojnas commented 3 years ago

Thanks for reporting, I can confirm the bug. The cause is an API change in NetworkX 2.5 (they stopped silently ignoring unused keywords: https://github.com/networkx/networkx/pull/4033). NetworkX 2.5 was released in Aug 2020 so it seems not many are using this --plot feature since nobody reported it before. Fix is waiting here:

https://review.gerrithub.io/c/Telecominfraproject/oopt-gnpy/+/515675