Problem loading Climate Data

41 views
Skip to first unread message

Dr. Stephen Kibe Rwigi

unread,
May 31, 2025, 3:44:19 PM5/31/25
to SWAT+ Editor
Good morning/Afternoon/evening SWAT+ Editor Community.
I trust that you are well
Could someone please assist loading climate data to SWAT+ Editor

When I import station data to SWAT+ Editor I get the following error:

Traceback (most recent call last):
  File "peewee.py", line 3291, in execute_sql
sqlite3.IntegrityError: UNIQUE constraint failed: weather_sta_cli.name

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 127, in import_data
  File "actions\import_weather.py", line 226, in create_weather_stations
  File "database\lib.py", line 13, in bulk_insert
  File "peewee.py", line 2011, in inner
  File "peewee.py", line 2082, in execute
  File "peewee.py", line 2887, in _execute
  File "peewee.py", line 2600, in _execute
  File "peewee.py", line 3299, in execute
  File "peewee.py", line 3289, in execute_sql
  File "peewee.py", line 3059, in __exit__
  File "peewee.py", line 192, in reraise
  File "peewee.py", line 3291, in execute_sql
peewee.IntegrityError: UNIQUE constraint failed: weather_sta_cli.name
[4276] Failed to execute script 'swatplus_api' due to unhandled exception!

--
Dr. Stephen K. Rwigi
Lecturer
Department of Meteorology
Reply all
Reply to author
Forward
0 new messages