Closed spatialthoughts closed 3 years ago
Confirmed here too on Catalina.
@PeterPetrik This is a pretty serious regression and would be good to fix this for the next point release.
@spatialthoughts . where do you have your application installed? have you relocated it?
Installed in Applications. Haven't renamed or moved it. Screenshot attached.
@spatialthoughts as a workaround, can you please open qgis python console and type
import os
os.environ["PROJ_LIB"]="/Applications/QGIS.app/Contents/Resources/proj"
and retry to run the algorithm?
Thanks. That Works. Will use the workaround for now. Hopefully, it's an easy fix for the next release.
i can think of two ways... do you use these algorithms directly (without qgis/processing)? one solution would allow it too, other one will not...
By directly, you mean running gdalwarp on the command line? I do that occasionally, but if that doesn't work there are ways to install those tools via other means or set an environment variable like here. Making it work via processing toolbox without any workarounds would be the top priority for me.
because I can either set PROJ_LIB in qgis environment (works only from QGIS) or create a wrapper bash script for every GDAL binary (will work from command line too)
It would be awesome to get it working properly everywhere. Is it possible to roll out the simple fix (proj_lib in qgis) for 3.16.1 and work towards the global fix for a later release?
@spatialthoughts can you try in tomorrow's nightly build? should be fixed "correctly" so it should work from command line too
@spatialthoughts as a workaround, can you please open qgis python console and type
import os os.environ["PROJ_LIB"]="/Applications/QGIS.app/Contents/Resources/proj"
and retry to run the algorithm?
Just ran into this problem under Monterey and QGIS 3.22.2-Bialowieza Trying to merge about 9 layers. Can confirm that the above appears to work and make the error message go away.
So....this is still an issue a few years later (or it came back)
this is still an issue with QGIS 3.24.0-Tisler
Having the same problem with all 3.22 versions, including LTR.
"PROJ_LIB"
env variable is not set in QGIS python console. All other GDAL env variables seem to be correctly set.
os.environ
environ({'USER': 'riku', '__CFBundleIdentifier': 'org.qgis.qgis3', 'COMMAND_MODE': 'unix2003', 'LOGNAME': 'riku', 'PATH': '/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/Applications/QGIS-LTR.app/Contents/MacOS/bin:/usr/bin:/bin:/usr/sbin:/sbin', 'PYQGIS_STARTUP': 'pyqgis-startup.py', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.ukED6bKMHa/Listeners', 'SHELL': '/bin/zsh', 'HOME': '/Users/riku', 'QT_AUTO_SCREEN_SCALE_FACTOR': '1', '__CF_USER_TEXT_ENCODING': '0x1F5:0x0:0x11', 'TMPDIR': '/var/folders/z6/ld52r6fn1dv_1h70k7z7d9n40000gn/T/', 'XPC_SERVICE_NAME': 'application.org.qgis.qgis3.21928270.21929400', 'XPC_FLAGS': '0x0', 'GDAL_DRIVER_PATH': '/Applications/QGIS-LTR.app/Contents/MacOS/lib/gdalplugins', 'GDAL_DATA': '/Applications/QGIS-LTR.app/Contents/Resources/gdal', 'PYTHONHOME': '/Applications/QGIS-LTR.app/Contents/MacOS', 'GDAL_PAM_PROXY_DIR': '/Users/riku/Library/Application Support/QGIS/QGIS3/profiles/raster_plugin/gdal_pam/', 'LC_CTYPE': 'UTF-8', 'SSL_CERT_DIR': '/Applications/QGIS-LTR.app/Contents/Resources/certs', 'SSL_CERT_FILE': '/Applications/QGIS-LTR.app/Contents/Resources/certs/certs.pem', 'DYLD_LIBRARY_PATH': '/Applications/QGIS-LTR.app/Contents/MacOS/lib'})
Same here using Monterey and QGIS 3.26.3.
I am having this same issue. 3.26.3 on Monterey 12.6.
i can think of two ways... do you use these algorithms directly (without qgis/processing)? one solution would allow it too, other one will not...
This seems to fix it.
I'm having this same problem when I try the Raster > Merge command on QGIS 3.22.8 on Mac OS 10.15.7.
--Edit: Fixed; problem is path to app is different for more recent QGIS: os.environ["PROJ_LIB"]="/Applications/QGIS-LTR.app/Contents/Resources/proj"
By the way, is there any way to update the Proj that QGIS uses? Mine seems to be using version 3 whereas the current version is 9.
I' m having the same issue on QGIS 3.28 LTR with MacOS 14.0. The above mentioned work-around solves the issue, but the next time I use QGIS the environment variable seems to be gone again. How can I make this work-around persistent?
The problem still exists in QGIS-LTR 3.28.12-Firenze on macOS 13.6.
The solution suggested above in https://github.com/qgis/QGIS/issues/39801#issuecomment-725219034 does not work - at least for QGIS-LTR, since it will be installed as QGIG-LTR.app. The path must probably be adjusted accordingly (though I did not try using QGIS Python console)
There is another solution:
In QGIS Options you can specify the correct path under System > Environment by overwriting the _PROJLIB variabel with the correct path (restart required) - see screenshot below:
This will fix the problem perhaps more permanently.
Having the same issue when try to run GDAL "Asignar proyeccion" in QGIS 3.34.9 on MacOS Sonoma 14.6.
The solution of overwrite PROJ_LIB with the path /Applications/QGIS-LTR.app/Contents/Resources/proj works fine for me
gdalwarp give an error on QGIS3.16 Mac because it can't find proj.db. Same operation works fine in QGIS3.10 LTR package.
"ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db"
To reproduce
QGIS and OS versions