[GIS] QGIS 3.4.4 and 3.6 SAGA Tools all not working with same error

qgisrastersaga

C:\OSGeo4W\bin>exit
Execution completed in 12.17 seconds
Results:
{'SHADE': 'C:/QGIS/output/HS.sdat'}

Loading resulting layers
The following layers were not correctly generated.

  • C:/QGIS/output/HS.sdat

You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

I get the above message on all the SAGA tools that I'm trying to run in QGIS, could someone give me an idea of what to look for here? I've tried switching versions of the ltr in the OSGeo4W installer, same thing happens.


Update (from comments):

I don't need help with any specific dataset per se, I think something is wrong with the way I am installing (64-bit advanced mode network installer OSGeo4W).

I've tried several times to install the 3 pieces, I need each of them, to no avail. There is always errors, i.e. the path variables written, versions, location of GRASS "C:/OSGeo4W/bin/bin" (notice two bins there) gets written and then GRASS doesn't work.

I was only able to get GRASS and SAGA both working by installing the 64-bit standalone installer long term release. All combinations of OSGeo4W installer, various ltr, latest, etc., all wrote either bad PATH variables, or one or more tools were pointing to the wrong folder locations for binaries. Which might not be a problem except I can't seem to find the processing option/dialogue where I can tell QGIS where the GRASS folder is.

And this is after getting a third party uninstall tool to clean up Windows registry and deleting my user profiles, otherwise problems would come back.

I'm documenting this in case other Windows users are in the same boat.

Best Answer

If you are running a 64-bit machine, make sure that you are installing QGIS from the 64-bit network installer: http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe.


I am an OSGeo4W user, for both Windows 64 and 32 bit.

And I must say that the installation made from the network installer seems to me pretty stable. I don't see another reason for the stand-alone installer more than for a Portable GIS.

The standard installation was made only once, and all I do is keep it updated from the advanced mode.

When a tool does not work, 90% of the time is due to a problem with the data or the procedure used.

There is no need to install outdated packages, they will surely not solve the problem and they are even likely to generate some more. When a regression in a package is found, it is reported to the developers and (earlier than later) it is fixed.

These are my current packages for a qgis, grass and saga search in a Win10 64bit machine:

OSGeo4W-qgis
OSGeo4W-grass
OSGeo4W-saga

This is the QGIS Settings > Options > System view:

QGIS System


This is the C:\OSGeo4W64\bin\qgis-grass7.bat content:

@echo off
call "%~dp0\o4w_env.bat"
call "%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\etc\env.bat"
call qt5_env.bat
call py3_env.bat
@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\lib;%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
start "QGIS" /B "%OSGEO4W_ROOT%\bin\qgis-bin-g7.exe" %*

This is the C:\OSGeo4W64\bin\o4w_env.bat content:

REM Make parent of this script location our current directory,
REM converting UNC path to drive letter if needed
pushd %~dp0
cd ..

REM set OSGEO4W_ROOT to short path version
for %%i in ("%CD%") do set OSGEO4W_ROOT=%%~fsi

REM start with clean path
set path=%OSGEO4W_ROOT%\bin;%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\WBem

for %%f in ("%OSGEO4W_ROOT%\etc\ini\*.bat") do call "%%f"

popd

And this is the C:\OSGeo4W64\bin\qgis-bin-g7.env content:

PATH=C:\OSGEO4~1\apps\qgis\bin;C:\OSGEO4~1\apps\grass\grass-7.6.0\lib;C:\OSGEO4~1\apps\grass\grass-7.6.0\bin;C:\OSGEO4~1\apps\Python37;C:\OSGEO4~1\apps\Python37\Scripts;C:\OSGEO4~1\apps\qt5\bin;{app};C:\Program Files\MiKTeX 2.9\miktex\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\Program Files\R\R-3.5.2\bin\x64
GDAL_DATA=C:\OSGEO4~1\share\gdal
GDAL_DRIVER_PATH=C:\OSGEO4~1\bin\gdalplugins
GDAL_FILENAME_IS_UTF8=YES
GEOTIFF_CSV=C:\OSGEO4~1\share\epsg_csv
GISBASE=C:\OSGEO4~1\apps\grass\grass-7.6.0
GRASS_PROJSHARE=C:\OSGEO4~1\share\proj
GRASS_PYTHON=C:\OSGEO4~1\bin\python.exe
JPEGMEM=1000000
OSGEO4W_ROOT=C:\OSGEO4~1
PROJ_LIB=C:\OSGEO4~1\share\proj
PYTHONHOME=C:\OSGEO4~1\apps\Python37
QGIS_PREFIX_PATH=C:/OSGEO4~1/apps/qgis
QT_PLUGIN_PATH=C:\OSGEO4~1\apps\qgis\qtplugins;C:\OSGEO4~1\apps\qt5\plugins
QT_RASTER_CLIP_LIMIT=4096
VSI_CACHE=TRUE
VSI_CACHE_SIZE=1000000
O4W_QT_PREFIX=C:/OSGEO4~1/apps/Qt5
O4W_QT_BINARIES=C:/OSGEO4~1/apps/Qt5/bin
O4W_QT_PLUGINS=C:/OSGEO4~1/apps/Qt5/plugins
O4W_QT_LIBRARIES=C:/OSGEO4~1/apps/Qt5/lib
O4W_QT_TRANSLATIONS=C:/OSGEO4~1/apps/Qt5/translations
O4W_QT_HEADERS=C:/OSGEO4~1/apps/Qt5/include

Reference links