Assistance Needed: Error Importing Weather Station Data in SWAT+

45 views
Skip to first unread message

Zena Tessema

unread,
Apr 11, 2025, 2:48:27 PMApr 11
to SWAT+ Editor

Dear SWAT+ Editor Team,

I am encountering an issue while attempting to import weather station data into SWAT+. My study area includes multiple weather stations, and during the import process, I received the following error:

sql
CopyEdit
Traceback (most recent call last): File "peewee.py", line 7253, in get File "peewee.py", line 4553, 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 327, in add_weather_files_type File "peewee.py", line 6805, in get File "peewee.py", line 7256, 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: ['', 'pcp', 1, 0] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "swatplus_api.py", line 107, in <module> File "actions\import_weather.py", line 124, in import_data File "actions\import_weather.py", line 256, in add_weather_files File "actions\import_weather.py", line 330, in add_weather_files_type FileNotFoundError: [Errno 2] No such file or directory: 'I:\\SWAT+\\Chemoga\\weather_swat_plus\\' [9220] Failed to execute script 'swatplus_api' due to unhandled exception!

It seems there is an issue with reading the weather file directory or file names. I would greatly appreciate any guidance or suggestions to help resolve this issue.

Thank you in advance for your support.

Best regards,
Zena Tessema

Sara Sandström

unread,
Apr 24, 2025, 10:03:24 PMApr 24
to SWAT+ Editor
Hi,
I get the same issue! Did you get any help with this?
I updated my QGIS and SWAT+ Editor, and it seems like in the new version of SWAT+ Editor, a new weather file with pet.txt is needed, but I can't find a template for how this file should look. So my old project no longer works to run due to this.
Is there any template available, or a way to be able to use only the files already available?

All the best
Sara
Reply all
Reply to author
Forward
0 new messages