UMEP-dev / UMEP-processing

7 stars 9 forks source link

local variable 'leafon' referenced before assignment when running SOLWEIG without CDSM #17

Closed gusbacos closed 1 year ago

gusbacos commented 1 year ago

When running SOLWEIG without any CDSM 'INPUT_CDSM': None, in the algs, following error message is shown:


Traceback (most recent call last):
  File "c:\JankaSolweig\runsolweig_notree.py", line 164, in <module>
    processing.run("umep:Outdoor Thermal Comfort: SOLWEIG", solweig_algs )
  File "C:\OSGeo4W\apps\qgis\python\plugins\processing\tools\general.py", line 108, in run
    return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
  File "C:\OSGeo4W\apps\qgis\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\python\plugins\processing\gui\AlgorithmExecutor.py", line 72, in execute
    results, ok = alg.run(parameters, context, feedback, {}, False)
_core.QgsProcessingException: Traceback (most recent call last):
  File "C:\Users\xbacos\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\processing_umep\processor\solweig_algorithm.py", line 799, in processAlgorithm
    psi = leafon * 0. + 1.
UnboundLocalError: local variable 'leafon' referenced before assignment

Desktop (please complete the following information): OS: Windows QGIS Version: 3.26.0 UMEP Version: 1.7.6 SuPy Version: 2022.4.7