IMPORT WEATHER STATIONS

5 views
Skip to first unread message

Ana Rincon

unread,
Nov 12, 2025, 6:21:57 AM (2 days ago) Nov 12
to SWAT+ Editor
Hi, I'm having this error in IMPORT WEATHER STATIONS. I think my files are correct, but could you help me checking them or understanding this error? thanks

Traceback (most recent call last):
  File "peewee.py", line 7295, in get
  File "peewee.py", line 4581, in __getitem__
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "actions\import_weather.py", line 328, in add_weather_files_type
  File "peewee.py", line 6838, in get
  File "peewee.py", line 7298, in get
database.project.climate.Weather_fileDoesNotExist: <Model: Weather_file> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."filename", "t1"."type", "t1"."lat", "t1"."lon" FROM "weather_file" AS "t1" WHERE (("t1"."filename" = ?) AND ("t1"."type" = ?)) LIMIT ? OFFSET ?
Params: ['3469_HMD.hmd', 'hmd', 1, 0]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "swatplus_api.py", line 111, in <module>
  File "actions\import_weather.py", line 410, in import_data
  File "actions\import_weather.py", line 125, in import_data
  File "actions\import_weather.py", line 255, in add_weather_files
  File "actions\import_weather.py", line 337, in add_weather_files_type
ValueError: Invalid value at line 3 of C:\QGIS_Tocaima\Tocaima\Scenarios\Default\TxtInOut\3469_HMD.hmd. Expecting nbyr, tstep, lat, long, elev values separated by a space.
[PYI-25632:ERROR] Failed to execute script 'swatplus_api' due to unhandled exception!
Weather.zip

Nancy B. Sammons

unread,
Nov 12, 2025, 7:48:42 AM (2 days ago) Nov 12
to Ana Rincon, SWAT+ Editor

Ana: 

Using the humidity as an example, the NAME column is entered as ‘3469_HMD’ (bolded below):

 

hmd.txt file:

ID,NAME,LAT,LONG,ELEVATION

3469,3469_HMD,914247.1656,1005998.478,309.00

 

But the daily file is named:

H3469.hmd.txt

 

In addition, I am uncertain about the name(s) of the weather files, if the interface accepts this format.  (H3469.hmd.txt) or if they need to renamed to (H3469_hmd.hmd)

 

Jaclyn, please clarify that for me.  

Nancy

 

 

From: swatplu...@googlegroups.com <swatplu...@googlegroups.com> On Behalf Of Ana Rincon
Sent: Tuesday, November 11, 2025 11:16 AM
To: SWAT+ Editor <swatplu...@googlegroups.com>
Subject: [SWAT+ Editor User Group] IMPORT WEATHER STATIONS

 

You don't often get email from anarp...@gmail.com. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "SWAT+ Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swatplus-edit...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/swatplus-editor/941f17cc-29d6-4911-b628-15eefd107ec7n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages