Weather data import error

64 views
Skip to first unread message

Jerome El Jeitany

unread,
Mar 16, 2023, 11:57:52 AM3/16/23
to SWAT+ Editor
Traceback (most recent call last):
  File "peewee.py", line 7072, in get
  File "peewee.py", line 4436, 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 321, in add_weather_files_type
  File "peewee.py", line 6624, in get
  File "peewee.py", line 7075, 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: ['', 'hmd', 1, 0]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "swatplus_api.py", line 99, in <module>
  File "actions\import_weather.py", line 121, in import_data
  File "actions\import_weather.py", line 251, in add_weather_files
  File "actions\import_weather.py", line 323, in add_weather_files_type
FileNotFoundError: [Errno 2] No such file or directory: 
[8168] Failed to execute script 'swatplus_api' due to unhandled exception!

Jaclyn Tech

unread,
Mar 17, 2023, 9:51:32 AM3/17/23
to SWAT+ Editor
Hi, try checking to see if you have any files referenced in your stations file that are not in the directory. It looks like one or more might be missing.
Reply all
Reply to author
Forward
0 new messages