About the DEM input problem

24 views
Skip to first unread message

riad arefin

unread,
Oct 10, 2025, 3:13:27 AMOct 10
to SWAT-MODFLOW
Hi,

I am trying to upload DEM in the QSWAT-MODFLOW but the following error is appearing:

An error has occurred while executing Python code:

AttributeError: 'NoneType' object has no attribute 'insertChildNode' Traceback (most recent call last):
  File "C:\Users/riadg/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\dialogs\createMFmodel_dialog.py", line 213, in loadDEM
    geovar_path = writeMF.load_geovar_raster(self, geovar='top_elev')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/riadg/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATMOD2\pyfolder\writeMF.py", line 404, in load_geovar_raster
    mf_group.insertChildNode(0, QgsLayerTreeLayer(layer))
    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'insertChildNode'


Python version: 3.12.11 (main, Jun 17 2025, 13:41:12) [MSC v.1943 64 bit (AMD64)]
QGIS version: 3.44.3-Solothurn Solothurn, 1d1d67e9edd

Python Path:
  • C:/PROGRA~1/QGIS34~1.3/apps/qgis/./python
  • C:/Users/riadg/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:/Users/riadg/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
  • C:/PROGRA~1/QGIS34~1.3/apps/qgis/./python/plugins
  • C:\PROGRA~1\QGIS34~1.3\apps\grass\grass84\etc\python
  • C:\Users\riadg\Documents
  • C:\Program Files\QGIS 3.44.3\bin\python312.zip
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312\DLLs
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312\Lib
  • C:\Program Files\QGIS 3.44.3\bin
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312\Lib\site-packages
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312\Lib\site-packages\win32
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312\Lib\site-packages\win32\lib
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312\Lib\site-packages\Pythonwin
  • C:/Users/riadg/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:\Users/riadg/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT\QSWAT
  • C:\PROGRA~1\QGIS34~1.3\apps\Python312\Lib\site-packages\setuptools\_vendor
  • C:/bald10_07-2025/MODFLOW
How I can solve this?

Thanks
Riad

Seonggyu Park

unread,
Dec 16, 2025, 10:24:38 PM (23 hours ago) Dec 16
to SWAT-MODFLOW
Hi Riad,

Are you trying to upload a TIFF file for the DEM? It should work with a TIFF file. If the issue persists, please share your QSWATMOD project folder and GIS file.
I'll take a look and get back to you.

Thanks,
Seonggyu
Reply all
Reply to author
Forward
0 new messages