Component: SWAT+ Editor
Area of impact: SWAT+ Editor user interface / project database access, specifically the Basin section.
2. Software VersionsGIS Interface: QGIS 3.44 with QSWAT+ installed from the current SWAT+ setup
SWAT+ Editor: 4.0.1
SWAT+ Revision: Rev. 62
Watershed Details:
BOST watershed project, delineated from a 25 m DEM. The project was regenerated from scratch after updating QGIS, SWAT+, QSWAT+, and SWAT+ Editor.
Modeling Aim:
Hydrological and agricultural modeling, including water balance, crop growth, and crop rotations/management operations.
The Problem:
The project can be opened normally in SWAT+ Editor, but when I open the Basin section, nothing is displayed and I receive the following error:
Unable to get project information from database. The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
The issue also occurs with a newly generated project using SWAT+ rev. 62 and SWAT+ Editor 4.0.1.
I initially suspected an outdated swatplus_datasets.sqlite, so I replaced it with a newly downloaded version, but this did not solve the problem.
I also checked the SWAT+ Editor REST API manually.
The following endpoints exist and respond with HTTP 400 when called manually without the required Project-Db header, which seems expected:
/basin/parms : 400 /basin/codes : 400The response is:
Project database path was not sent in the request header.I also checked the variable-definition database located at:
C:\Users\jueec\SWATPlus\SWATPlusEditor\resources\app.asar.unpacked\static\swatplus_vardefs.sqliteThe following endpoints both respond successfully with HTTP 200 when the App-Path header is provided:
/definitions/vars/parameters_bsn : 200 /definitions/vars/codes_bsn : 200Therefore, the REST API appears to be running, the Basin routes exist, and swatplus_vardefs.sqlite can be read successfully.
I also checked the running REST API process. SWAT+ Editor starts:
C:\Users\jueec\SWATPlus\SWATPlusEditor\resources\app.asar.unpacked\static\api_dist\swatplus_rest_api.exe 5000So the backend appears to be listening on port 5000.
The project SQLite database and the downloaded swatplus_datasets.sqlite also pass SQLite integrity checks.
Steps to Reproduce:
Install/update to QGIS 3.44, current QSWAT+, SWAT+ rev. 62, and SWAT+ Editor 4.0.1.
Create a new QSWAT+ project and complete watershed/HRU setup.
Open the generated project in SWAT+ Editor.
Open the Basin section.
The Basin page remains empty.
SWAT+ Editor displays:
The same behavior occurs even after replacing swatplus_datasets.sqlite with a newly downloaded version.
I would appreciate any advice on which API request or configuration could be responsible for this 404 error, since /basin/parms, /basin/codes, and the corresponding /definitions/vars/... endpoints appear to exist and respond correctly when tested manually.