Opened 3 years ago
Closed 3 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 )
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 , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Owner: | changed from | to
---|
comment:3 by , 3 years ago
Running
qgis.bat --postinstall
fixed it, thanks. Could this be triggered when GRASS is installed?
comment:5 by , 3 years ago
Is this fixed after https://github.com/jef-n/OSGeo4W/commit/4c38a12841e8ac4c471ad7762cafcfe4c4c70748?
comment:6 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
GISBASE
is saved inbin\qgis-bin.env
, whenetc/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 soGISBASE
remains empty. It can be updated by runningqgis.bat --postinstall