sydroconsult / QTalsim

QTalsim is a QGIS plugin designed to create hyrological response units (HRUs) suitable for Talsim
2 stars 2 forks source link

Error when executing HRU intersection #15

Closed jamaa closed 2 months ago

jamaa commented 2 months ago
An error has occurred while executing Python code: 

KeyError: NULL 
Traceback (most recent call last):
  File "C:\Users/felixfroehlich/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QTalsim\qtalsim.py", line 1561, in performIntersect
    sum_areas[ezg] += area
KeyError: NULL
jamaa commented 2 months ago

trying again with both "Minimum ..." options deactivated causes a different error:

An error has occurred while executing Python code: 

_core.QgsProcessingException: Could not write feature into OUTPUT 
Traceback (most recent call last):
  File "C:\Users/felixfroehlich/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QTalsim\qtalsim.py", line 1577, in performIntersect
    self.eflLayer = processing.run("native:dissolve", {'INPUT': self.finalLayer,'FIELD': eflFieldList, 'SEPARATE_DISJOINT':False,'OUTPUT':'TEMPORARY_OUTPUT'}, feedback=None)['OUTPUT']
  File "C:\OSGeo4W/apps/qgis-ltr/./python/plugins\processing\tools\general.py", line 108, in run
    return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
  File "C:\OSGeo4W/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 187, in runAlgorithm
    ret, results = execute(alg, parameters, context, feedback, catch_exceptions=False)
  File "C:\OSGeo4W/apps/qgis-ltr/./python/plugins\processing\gui\AlgorithmExecutor.py", line 72, in execute
    results, ok = alg.run(parameters, context, feedback, {}, False)
_core.QgsProcessingException: Could not write feature into OUTPUT
jamaa commented 2 months ago

Maybe the above errors were due to one of the input layers being in a different coordinate system?

I tried again with all input layers already cleaned (no gaps or overlaps) and all in the same CRS, but then QGIS completely crashes after processing for a while.

lorenz3tla commented 2 months ago

Bug fixed with commit f42d166. Fix is released in QGIS with V1.3.1.