[MacPorts] #64537: qgis3 @3.22.2_0+grass+postgresql13+python39: error gdalwarp missing or insufficient permissions
MacPorts
noreply at macports.org
Wed Jan 26 23:04:05 UTC 2022
#64537: qgis3 @3.22.2_0+grass+postgresql13+python39: error gdalwarp missing or
insufficient permissions
----------------------------------------+--------------------
Reporter: bal-agates | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Keywords: qgis3 gdalwarp clip raster | Port: qgis3
----------------------------------------+--------------------
When running Raster > Extraction > Clip Raster by Mask Layer I am getting
the following error:
{{{
QGIS version: 3.22.2-Białowieża
Qt version: 5.15.2
Python version: 3.9.10
GDAL version: 3.4.0
GEOS version: 3.10.1-CAPI-1.16.0
PROJ version: Rel. 8.2.1, January 1st, 2022
PDAL version: 2.3.0 (git-version: Release)
Algorithm started at: 2022-01-26T16:08:10
Algorithm 'Clip raster by mask layer' starting…
Input parameters:
{ 'ALPHA_BAND' : False, 'CROP_TO_CUTLINE' : True, 'DATA_TYPE' : 0, 'EXTRA'
: '', 'INPUT' : '/Users/brett/GIS/DEM/AZ/AZ-
Bouse/USGS_13_n34w115_20211215.tif', 'KEEP_RESOLUTION' : False, 'MASK' :
'/Users/brett/qgisdata/AZ/Data/azgs_dgm_107/Shapefiles/bouse_extent.shp',
'MULTITHREADING' : False, 'NODATA' : None, 'OPTIONS' : '', 'OUTPUT' :
'TEMPORARY_OUTPUT', 'SET_RESOLUTION' : False, 'SOURCE_CRS' : None,
'TARGET_CRS' : None, 'X_RESOLUTION' : None, 'Y_RESOLUTION' : None }
GDAL command:
gdalwarp -overwrite -of GTiff -cutline
/Users/brett/qgisdata/AZ/Data/azgs_dgm_107/Shapefiles/bouse_extent.shp -cl
bouse_extent -crop_to_cutline /Users/brett/GIS/DEM/AZ/AZ-
Bouse/USGS_13_n34w115_20211215.tif
/private/var/folders/5z/18s4yhbx4zj7lw9zq0h8gqym0000gn/T/processing_bgrVLE/76575832d3e445f9a817631801f721c8/OUTPUT.tif
GDAL command output:
Process gdalwarp failed to start. Either gdalwarp is missing, or you may
have insufficient permissions to run the program.
Execution failed after 0.02 seconds
Loading resulting layers
Algorithm 'Clip raster by mask layer' finished
}}}
The error message seems to imply that QGIS is trying to run gdalwarp as a
shell command? I have verified that I have gdalwarp installed and that it
runs from the command line:
{{{
$ ll /opt/local/bin/gdalwarp
16 -rwxr-xr-x 1 root admin 88629 Jan 20 19:55 /opt/local/bin/gdalwarp
$ gdalwarp --version
GDAL 3.4.0, released 2021/11/04
}}}
With this version of QGIS3 I was able to import a GeoTIFF which I assume
uses some GDAL functions or commands.
In QGIS3 > Preferences >Environment I see
- GISBASE = /opt/local/bin
In QGIS3 > Preferences >Current Environment variables I see [Readonly -
Bold which seems to indicates modified at startup]
- PATH = /usr/bin:/bin:/usr/sbin:/sbin: [Bold]
- GISBASE = /opt/local/bin [Bold]
Probably not helpful but I used QGIS3 > Plugins > Python Console and ran
{{{
>>> print(os.environ['PATH'])
/usr/bin:/bin:/usr/sbin:/sbin
}}}
When QGIS3 tries to run gdalwarp is it using GISBASE or PATH or a
concatenation of both for the command path?
I checked QGIS permissions in Apple > System Preferences > Security &
Privacy > Files and Folders it had all options enabled. I even tried an
experiment where I added QGIS3 to Apple > System Preferences > Security &
Privacy > Full Disk Access.
I do not know how to verify what $PATH QGIS3 uses when it executes
gdalwarp (assuming it is trying to execute a shell command version).
I have considered the possibility the error message is misleading. Could
gdalwarp have been found and run but it generated an error that wasn't
handled well?
MacPort configuration problem or QGIS3 problem? I did a quick scan of
QGIS issues and didn't see anything that is an obvious match.
I am running on a macOS 12.1, arm64 and a few days ago I did a "port
upgrade outdated". I have done something similar on earlier versions
without problems but cannot remember when. Maybe not on my macOS 12/arm64
computer? Versions
{{{
QGIS version
3.22.2-Białowieża
QGIS code branch
Release 3.22
Qt version
5.15.2
Python version
3.9.10
GDAL/OGR version
3.4.0
PROJ version
8.2.1
EPSG Registry database version
v10.041 (2021-12-03)
GEOS version
3.10.1-CAPI-1.16.0
SQLite version
3.37.2
PDAL version
2.3.0
PostgreSQL client version
13.5
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
macOS 12.1
Active Python plugins
QuickOSM
2.0.0
latlontools
3.5.9
processing
2.12.99
sagaprovider
2.12.99
grassprovider
2.12.99
db_manager
0.1.20
MetaSearch
0.3.5
}}}
--
Ticket URL: <https://trac.macports.org/ticket/64537>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list