Error in importing the weather station data

8 views
Skip to first unread message

Fayez Ahammad

unread,
Feb 9, 2026, 2:46:52 PM (6 days ago) Feb 9
to SWAT+ Editor
Dear All SWAT+ Editor users,
I am getting this below error while importing the weather station data. Do you have any suggestions??

Traceback (most recent call last):
  File "peewee.py", line 3322, 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 108, in <module>
  File "actions\import_weather.py", line 128, in import_data
  File "actions\import_weather.py", line 227, in create_weather_stations
  File "database\lib.py", line 13, in bulk_insert
  File "peewee.py", line 2036, in inner
  File "peewee.py", line 2107, in execute
  File "peewee.py", line 2912, in _execute
  File "peewee.py", line 2625, in _execute
  File "peewee.py", line 3330, in execute
  File "peewee.py", line 3320, in execute_sql
  File "peewee.py", line 3088, in __exit__
  File "peewee.py", line 196, in reraise
  File "peewee.py", line 3322, in execute_sql
peewee.IntegrityError: UNIQUE constraint failed: weather_sta_cli.name
[PYI-17740:ERROR] Failed to execute script 'swatplus_api' due to unhandled exception!
Reply all
Reply to author
Forward
0 new messages