Bugs in the Network tool
CsatiZoltan opened this issue · 5 comments
For the network tool to work with Python 3.7.6, we need some changes:
- at most
networkx
package version 2.1. Reason: thenode
attribute no longer exists as of version 2.4 (see here) - correct variable
n
ton.astype(np.int16)
in lines 45, 46 of module graphpen_tol:
and similarly in module graphcut_tol:
Reason: with numpy version 1.18.1, I get the error message:TypeError: 'float' object cannot be interpreted as an integer
Remark: the reason why the "Build Graph" tool works in the standalone Windows version is because it uses networkx 2.2
. In fact, the previously mentioned issue with the node
attribute was deprecated since version 2.2, and was removed in version 2.4.
I just replace all the "node[" by "nodes[", And now every thing is ok for me. I had pushed. have a try?
Yes, that solves the problem, as expected. You need to make the changes in /menus/Analysis/Skeleton Network/graph_plgs.py and in /ipyalg/graph/sknw.py.
The other modification I proposed concerning linspace
also works.
Also note that the issue with .node
also concerns your sknw repository.
Another error found in graph_plgs.py: connected_component_subgraphs
is removed. For a solution, see the related issue rkistner/chinese-postman#21.