Opened 2 years ago

Closed 2 years ago

#734 closed defect (fixed)

GISBASE Environment not set

Reported by: aharfoot Owned by: jef
Priority: minor Component: Installer
Version: Keywords:
Cc:

Description (last modified by jef)

When I install QGIS LTR 3.22.4 using the package based installer (individual packages, not the meta-package) along with GRASS 7.8 and run the C:\OSGeo4W\bin\qgis-ltr-bin.exe, the GRASS processing provider is broken, and trying to run any GRASS processing tool gives the following error:

This algorithm cannot be run :-( The specified GRASS 7 folder "C:\OSGeo4W\bin\bin" does not contain a valid set of GRASS 7 modules. Please, go to the Processing settings dialog, and check that the GRASS 7 folder is correctly configured

The same behaviour is not seen with the standalone QGIS installer.

From #47163 I can see that this message is returned by Grass7Utils.py, and after some exploration I discovered that this is because the GISBASE environment variable is not set.

If QGIS is launched via the batch file: C:\OSGeo4W\bin\qgis-ltr.bat, then GISBASE is correctly set and the GRASS processing tool function correctly.

The OSGeo4W package based installer creates a Windows shortcut that points to the C:\OSGeo4W\bin\qgis-ltr-bin.exe, and therefore when this is run, the bug exhibits itself.

Steps to reproduce the issue

With the OSGeo4W package installer, install QGIS LTR 3.22.4 along with GRASS 7.8 (7.8.7-1) on MS Windows. Load QGIS via the Start Menu shortcut. In QGIS, open the Processing panel and double click on a tool from the GRASS provider.

Check the status of the GISBASE environment variable through the QGIS python console by executing:

os.environ['GISBASE']

Environment:

QGIS: 3.22.4 GRASS: 7.8.7-1 OS: Windows 10 64bit

Change History (6)

comment:1 by jef, 2 years ago

Description: modified (diff)

comment:2 by jef, 2 years ago

Owner: changed from osgeo4w-dev@… to jef

GISBASE is saved in bin\qgis-bin.env, when etc/postinstall/qgis.bat runs, but only if the grassplugin is present on the first run. If the grassplugin is installed later is it not recreated and so GISBASE remains empty. It can be updated by running qgis.bat --postinstall

comment:3 by aharfoot, 2 years ago

Running

qgis.bat --postinstall

fixed it, thanks. Could this be triggered when GRASS is installed?

comment:4 by andreaerdna, 2 years ago

Also reported in #700

Last edited 2 years ago by jef (previous) (diff)

comment:6 by jef, 2 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.