Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network following crashing when levels are missing #476

Open
sjib opened this issue Oct 28, 2024 · 3 comments
Open

Network following crashing when levels are missing #476

sjib opened this issue Oct 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sjib
Copy link
Contributor

sjib commented Oct 28, 2024

Describe the bug
A clear and concise description of what the bug is.

When selecting network following upstream on node V1.102 a python error appears and cursors keep turning (blue circle). Difficult to work on.

To Reproduce
Exact steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

No half crash if using network following function

Screenshots / data
If applicable, add screenshots or data to help explain your problem.
grafik

2024-10-28T11:59:34     WARNING    Traceback (most recent call last):
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwmaptools.py", line 145, in canvasReleaseEvent
              self.leftClicked(event)
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwmaptools.py", line 559, in leftClicked
              self.getTree(match.featureId())
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwmaptools.py", line 508, in getTree
              nodes, edges = self.network_analyzer.getTree(node_id, upstream)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 298, in getTree
              pred, _ = nx.bellman_ford_predecessor_and_distance(my_graph, node)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "C:\PROGRA~1\QGIS 3.34.8\apps\Python312\Lib\site-packages\networkx\utils\decorators.py", line 789, in func
              return argmap._lazy_compile(__wrapper)(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File " compilation 4", line 3, in argmap_bellman_ford_predecessor_and_distance_1
              import gzip
              ^^^^
              File "C:\PROGRA~1\QGIS 3.34.8\apps\Python312\Lib\site-packages\networkx\utils\backends.py", line 633, in __call__
              return self.orig_func(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "C:\PROGRA~1\QGIS 3.34.8\apps\Python312\Lib\site-packages\networkx\algorithms\shortest_paths\weighted.py", line 1246, in bellman_ford_predecessor_and_distance
              raise nx.NodeNotFound(f"Node {source} is not found in the graph")
             networkx.exception.NodeNotFound: Node 82 is not found in the graph
             
2024-10-28T12:00:43     WARNING    Traceback (most recent call last):
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwmaptools.py", line 145, in canvasReleaseEvent
              self.leftClicked(event)
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwmaptools.py", line 559, in leftClicked
              self.getTree(match.featureId())
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwmaptools.py", line 508, in getTree
              nodes, edges = self.network_analyzer.getTree(node_id, upstream)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_pre_202403/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 298, in getTree
              pred, _ = nx.bellman_ford_predecessor_and_distance(my_graph, node)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File " compilation 4", line 3, in argmap_bellman_ford_predecessor_and_distance_1
              import gzip
              ^^^^
              File "C:\PROGRA~1\QGIS 3.34.8\apps\Python312\Lib\site-packages\networkx\utils\backends.py", line 633, in __call__
              return self.orig_func(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "C:\PROGRA~1\QGIS 3.34.8\apps\Python312\Lib\site-packages\networkx\algorithms\shortest_paths\weighted.py", line 1246, in bellman_ford_predecessor_and_distance
              raise nx.NodeNotFound(f"Node {source} is not found in the graph")
             networkx.exception.NodeNotFound: Node 82 is not found in the graph

Desktop (please complete the following information):

  • TWW version 2024.0.3
  • QGIS Version 3.34.8
  • OS Win 10

Additional context
Add any other context about the problem here.

Looks like levels (cote attributes) are missing in this part of (secondary) network

@sjib sjib added the bug Something isn't working label Oct 28, 2024
@sjib
Copy link
Contributor Author

sjib commented Oct 28, 2024

No reach_point levels
grafik

@sjib
Copy link
Contributor Author

sjib commented Oct 28, 2024

No cover level
grafik

@sjib
Copy link
Contributor Author

sjib commented Oct 28, 2024

Bottom level exists:
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant