please anyone guide me to fix this error

17 views
Skip to first unread message

mubashir ali

unread,
Oct 6, 2025, 11:16:21 AM (9 days ago) Oct 6
to SWAT+ Editor
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: ['sta01.hmd', 'hmd', 1, 0]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "swatplus_api.py", line 108, in <module>
  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 352, in add_weather_files_type
ValueError: Invalid value at line 4 of C:\chao\Chao\Scenarios\Default\TxtInOut\sta01.hmd. Expecting year, julian day, and weather value separated by a space.
[PYI-21848:ERROR] Failed to execute script 'swatplus_api' due to unhandled exception!

Jaclyn Tech

unread,
Oct 7, 2025, 12:34:14 PM (8 days ago) Oct 7
to SWAT+ Editor
Please check the format requirements for your weather data. It looks like several errors related to formatting. There are detailed instructions and sample data on the import screen in the editor.
Reply all
Reply to author
Forward
0 new messages