HRU ERROR

11 views
Skip to first unread message

Eunice Wangui

unread,
Feb 20, 2026, 12:01:34 PM (10 days ago) Feb 20
to swat...@googlegroups.com, arc...@googlegroups.com
Dear SWAT Community,
Using QSWAT+ 3.1.2: I'm trying to run HRU using HWSD data alongside ESA Sentinel Landcover and SRTM DEM. The 1st tab reads my data successfully (rasters and lookup tables), but when I get to the 2nd tab of creating HRU, once I click run, I get an error that :

Could not create soils_sol and soils_sol_layer tables from naivasha_usersoil table in soil database C:/SWAT/NAIVASHA_16022026/NAIVASHA_16022026.sqlite: Traceback (most recent call last):

File "C:\Users/eunice.mwangi/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\DBUtils.py", line 1081, in writeSoilsTable

lid = self.writeUsedSoilRow(sid, lid, name, row, writeCursor, insert, insertLayer)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users/eunice.mwangi/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\DBUtils.py", line 1107, in writeUsedSoilRow

cursor.execute(insertLayer, (lid, sid, i+1) + row[startLayer:startLayer+layerWidth] + (row[startCal+i], row[startPh+i]))

~~~^^^^^^^^^^^^

IndexError: tuple index out of range


Any idea how to solve this? Ill really appreciate.


Thank you.


--
Regards, 
Eunice Wangui
Mobile: +254 724 106 552

Chris George

unread,
Feb 20, 2026, 12:30:58 PM (10 days ago) Feb 20
to Eunice Wangui, swat...@googlegroups.com, arc...@googlegroups.com
Check that your usersoil table has 152 columns.

On 2/20/2026 6:57 AM, Eunice Wangui wrote:
> Dear SWAT Community, Using QSWAT+ 3. 1. 2: I'm trying to run HRU using
> HWSD data alongside ESA Sentinel Landcover and SRTM DEM. The 1st tab
> reads my data successfully (rasters and lookup tables), but when I get
> to the 2nd tab of creating HRU,
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
> ZjQcmQRYFpfptBannerEnd
> email: meunic...@gmail.com <mailto:meunic...@gmail.com>
> *
> *
>
> --
> You received this message because you are subscribed to the Google
> Groups "SWAT-user" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swatuser+u...@googlegroups.com
> <mailto:swatuser+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> swatuser/CAMT148zH2_4KgO8hTUnbPXF9yUkmPuG7ZRRxLSU%3D-
> dNGWtkN%2BA%40mail.gmail.com <https://urldefense.com/v3/__https://
> groups.google.com/d/msgid/swatuser/
> CAMT148zH2_4KgO8hTUnbPXF9yUkmPuG7ZRRxLSU*3D-
> dNGWtkN*2BA*40mail.gmail.com?utm_medium=email&utm_source=footer__;JSUl!!
> KwNVnqRv!
> D7FCQH4bElwq_zUXDean0haWZSeoSZFXtLglo_eEoaL45G2M5zc_fBJd_ODMr59NZBcOaZAGEwhZPFGVhGbBOLE$>.

Eunice Wangui

unread,
Feb 24, 2026, 2:24:40 PM (6 days ago) Feb 24
to Chris George, swat...@googlegroups.com, arc...@googlegroups.com
Hi Chris,
Thanks for the prompt reply, I'll check it out. 

Best wishes,
Eunice.

Eunice Wangui

unread,
Feb 24, 2026, 2:24:45 PM (6 days ago) Feb 24
to Chris George, swat...@googlegroups.com, arc...@googlegroups.com
Hi George, 

It has worked. Thanks alot. Ive managed to get past the HRU tab, by expanding the Usersoils columns to 152 from 40. 
New problem: Now, Im at step 3, editing inputs and running SWAT+: Im led to SWAT+ Editor 3.1.4. Here I get a new error while importing the GIS data:

Traceback (most recent call last):
  File "peewee.py", line 3322, in execute_sql
sqlite3.OperationalError: table landuse_lum has no column named plnt_com_id

During handling of the above exception, another exception occurred:


Traceback (most recent call last):
  File "actions\import_gis.py", line 140, in insert_default
  File "actions\import_gis.py", line 981, in insert_hrus
  File "actions\import_gis.py", line 873, in insert_landuse
  File "peewee.py", line 6746, in create
  File "peewee.py", line 6956, in save
  File "peewee.py", line 2036, in inner
  File "peewee.py", line 2107, in execute
  File "peewee.py", line 2912, in _execute
  File "peewee.py", line 2625, in _execute
  File "peewee.py", line 3330, in execute
  File "peewee.py", line 3320, in execute_sql
  File "peewee.py", line 3088, in __exit__
  File "peewee.py", line 196, in reraise
  File "peewee.py", line 3322, in execute_sql
peewee.OperationalError: table landuse_lum has no column named plnt_com_id

Here's a screenshot: 
image.png

Could you please let me know how to go about this new error:
Thanks again.
Eunice.
Reply all
Reply to author
Forward
0 new messages