error in swat+editor

41 views
Skip to first unread message

Eskinder Zinabu Belachew

unread,
Jun 19, 2025, 3:35:13 PM6/19/25
to SWAT+ Editor
I am getting this error upon running swat+editor program. I appreciate your help to solve the errors:
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 "swatplus_api.py", line 122, in <module>
  File "actions\write_files.py", line 131, in write
  File "actions\write_files.py", line 751, in write_ops
  File "fileio\ops.py", line 77, in write
  File "peewee.py", line 4700, in __get__
  File "peewee.py", line 4691, in get_rel_instance
  File "peewee.py", line 6805, in get
  File "peewee.py", line 7256, in get
database.project.hru_parm_db.Fertilizer_frtDoesNotExist: <Model: Fertilizer_frt> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."name", "t1"."min_n", "t1"."min_p", "t1"."org_n", "t1"."org_p", "t1"."nh3_n", "t1"."pathogens", "t1"."description" FROM "fertilizer_frt" AS "t1" WHERE ("t1"."id" = ?) LIMIT ? OFFSET ?
Params: [45, 1, 0]
[7788] Failed to execute script 'swatplus_api' due to unhandled exception!

Jaclyn Tech

unread,
Jun 25, 2025, 1:28:28 AM6/25/25
to SWAT+ Editor
I think this looks like your graze ops might be referencing a fertilizer that doesn't exist in fertilizer_ft table. Or possible if you have manual operations in management schedules. Check to make sure you're not referencing a fertilizer that doesn't exist.

Reply all
Reply to author
Forward
0 new messages