Hi,
I am new to SWAT-MODFLOW, and I would greatly appreciate any help resolving the issue I am facing.
I am following the demo project in the tutorial and getting an error when I try to import SWAT shapefiles. I get the following error message shown in red below. Fyi, I use QGIS 3.10.5 and QSWATMOD2.
I have no idea what is wrong and how to resolve the problem. Please help. Thank you!
Best,
Lee
An error has occurred while executing Python code:
AttributeError: 'NoneType' object has no attribute 'insertChildNode'
Traceback (most recent call last):
File "C:/Users/ljuyoung/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\QSWATMOD2.py", line 1363, in hru_shapefile
swat_group.insertChildNode(0, QgsLayerTreeLayer(layer))
AttributeError: 'NoneType' object has no attribute 'insertChildNode'
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.10.5-A Coruña A Coruña, 984615fe1e
2020-08-25T23:19:55 WARNING Traceback (most recent call last):
File "C:/Users/ljuyoung/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\QSWATMOD2.py", line 623, in import_mf_grid
modflow_functions.import_mf_grid(self)
File "C:/Users/ljuyoung/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\pyfolder\modflow_functions.py", line 1247, in import_mf_grid
processing.run('native:fixgeometries', params)
File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python/plugins\processing\tools\general.py", line 106, in run
return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 181, in runAlgorithm
raise QgsProcessingException(msg)
_core.QgsProcessingException: There were errors executing the algorithm.
2020-08-25T23:21:01 WARNING Traceback (most recent call last):
File "C:/Users/ljuyoung/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\QSWATMOD2.py", line 654, in create_rivs
modflow_functions.mf_riv1(self)
File "C:/Users/ljuyoung/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\pyfolder\modflow_functions.py", line 437, in mf_riv1
{'INPUT': input1, 'OUTPUT': mf_riv_shapefile}
File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python/plugins\processing\tools\general.py", line 106, in run
return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 181, in runAlgorithm
raise QgsProcessingException(msg)
_core.QgsProcessingException: There were errors executing the algorithm.