Open AlisterH opened 1 year ago
Actually, one of those errors might have been in yet another situation, because this is what I get now in the third situation:
2022-09-08T13:24:01 WARNING Traceback (most recent call last):
File "C:\Users/alistair/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\volume_calculation_tool\volume_calculation_tool.py", line 366, in calculationFinished
self.writeResultsToLayer()
File "C:\Users/alistair/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\volume_calculation_tool\volume_calculation_tool.py", line 452, in writeResultsToLayer
with edit(self.current_task_options.vector_layer):
File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\core\additions\edit.py", line 38, in __enter__
assert self.layer.startEditing()
AssertionError
At some point I also saw this error, but I lost track of the situation that it occurred in:
2022-09-08T12:46:58 WARNING Traceback (most recent call last):
File "C:\Users/alistair/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\volume_calculation_tool\volume_calculation_tool.py", line 474, in workflow
self.doSimpleWorkflow()
File "C:\Users/alistair/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\volume_calculation_tool\volume_calculation_tool.py", line 477, in doSimpleWorkflow
self.getVolumeSimple()
File "C:\Users/alistair/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\volume_calculation_tool\volume_calculation_tool.py", line 629, in getVolumeSimple
absolute_avg_height = abs(internal_external_map[key][1] - internal_external_map[key][2])
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Yeah, agreed error handling/feedback should be improved. At the moment the plugin expects the user to not do anything it is not designed to do. There are also checks missing.
Trying to debug the crashes in the other ticket, I've noticed some situations where it doesn't crash QGIS, but the error handling could be improved:
The errors are:
And