Error running SWAT+ plant

121 views
Skip to first unread message

Fábio Mação

unread,
Aug 4, 2022, 11:34:50 PM8/4/22
to swatplu...@googlegroups.com
Hello,

Please someone could help me.

I tried run SWAT+ editor with a new LULC raster, but always I try start swat+ project the follow error occurs:

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "actions\import_gis.py", line 135, in insert_default
  File "actions\import_gis.py", line 908, in insert_hrus
  File "actions\import_gis.py", line 786, in insert_landuse
  File "peewee.py", line 6393, in create
  File "peewee.py", line 6603, in save
  File "peewee.py", line 1911, in inner
  File "peewee.py", line 1982, in execute
  File "peewee.py", line 2761, in _execute
  File "peewee.py", line 2479, in _execute
  File "peewee.py", line 3173, in execute
  File "peewee.py", line 3157, in execute_sql
  File "peewee.py", line 2933, in __exit__
  File "peewee.py", line 191, in reraise
  File "peewee.py", line 3160, in execute_sql
peewee.IntegrityError: UNIQUE constraint failed: plant_ini.name


Jaclyn Tech

unread,
Aug 10, 2022, 12:59:56 PM8/10/22
to SWAT+ Editor
You might need to open your project sqlite database and manually empty the plant_ini table data. Not sure what steps you're doing along the way that's causing this to occur though.

Louise Malmquist

unread,
Sep 6, 2022, 7:49:25 AM9/6/22
to SWAT+ Editor
Hi

I receive the same error after creating a simplified LU-map and adding two more crops (based on the same parameters as other crops) to my lookup table. 
I have checked for any duplicates in both the lookup table and in the plan database. No error found there. 
Can you kindly clearify how you solved this issue. Would be much of help.

Kind regards,
Louise



Reply all
Reply to author
Forward
0 new messages