error when rerunning SPE

31 views
Skip to first unread message

Arend van Harten

unread,
Mar 27, 2025, 11:51:03 AM3/27/25
to SWAT+ Editor
Dear all, 

Sometimes (not always) after making small changes in the SPE to my input parameters (in my case resevoir outlets and year of becoming operational. I get this error when editor reads the files for interpetation:

Traceback (most recent call last):
  File "peewee.py", line 3291, in execute_sql
sqlite3.OperationalError: database is locked

"During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "swatplus_api.py", line 119, in <module>
  File "actions\read_output.py", line 164, in read
  File "actions\read_output.py", line 308, in setup_meta_tables
  File "peewee.py", line 2011, in inner
  File "peewee.py", line 2082, 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.OperationalError: database is locked
[13792] Failed to execute script 'swatplus_api' due to unhandled exception!"

restarting my computer solves this issue teporarly, but this is quite annoying and time consuming. Does anyone have a solution?

Thanks, 
Arend

Arend van Harten

unread,
Apr 9, 2025, 12:51:25 PM4/9/25
to SWAT+ Editor
For those who encounter a similar problem:

I have found out why this is happening. When running SPE whilst you have the visualise tab open in QSWAT+ this error occurs. So you must close the visualiser every time you run SPE. 

Op donderdag 27 maart 2025 om 17:51:03 UTC+2 schreef Arend van Harten:
Reply all
Reply to author
Forward
0 new messages