我正在macOS 10.15(Catalina)中使用3.4.12-Madeira,并且GRASS工具出现了一些问题,如随附的日志所示。
由于QGIS / GRASS无法找到/usr/local/Cellar/osgeo-grass/7.6.1_5/grass76/etc/lock
,因此这似乎是一个路径问题。
实际上,我没有使用Homebrew安装GRASS,因为如果我理解正确的话,GRASS随QGIS安装程序一起提供。
查看我的系统设置,我只添加了一条额外路径:
PREPEND PATH /Library/Frameworks/Python.framework/Versions/3.6/bin:
顺便说一句,还是有必要还是最新的QGIS安装程序带有自己的Python?
GRASS7文件夹设置为:/Applications/QGIS3.app/CONTENTS/MacOS/grass
,该文件夹不存在。我将其手动更改为/Applications/QGIS3.4.app/Contents/Resources/grass7
。当我保存并关闭“选项”窗口时,QGIS崩溃,但是该值已保存。
有什么建议吗?
完整日志:
Processing algorithm…
Algorithm 'r.viewshed' starting…
Input parameters:
{ '-b' : False, '-c' : False, '-e' : False, '-r' : False, 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'coordinates' : '420169,4408099', 'input' : '/Users/jbogdani/Dropbox/GIS-Projects/SITARC-simple/3d_data/srtm/chaonia-srtm-utm.tif', 'max_distance' : -1, 'memory' : 500, 'observer_elevation' : 1.75, 'output' : '/private/var/folders/7n/sjhz6lg55vj6jk7v2qt_wnmh0000gn/T/processing_0c7a62f57a39412abf265ff797e2af74/a47be9aaba4b4518827b12da6a147751/output.tif', 'refraction_coeff' : 0.14286, 'target_elevation' : 0 }
g.proj -c proj4="+proj=utm +zone=34 +datum=WGS84 +units=m +no_defs"
r.external input="/Users/jbogdani/Dropbox/GIS-Projects/SITARC-simple/3d_data/srtm/chaonia-srtm-utm.tif" band=1 output="rast_5d9e0d32852e72" --overwrite -o
g.region n=4489401.928795547 s=4340851.352953624 e=500104.06337307056 w=348409.8518161564 res=27.57575196453629
r.viewshed input=rast_5d9e0d32852e72 coordinates=420169.0,4408099.0 observer_elevation=1.75 target_elevation=0 max_distance=-1 refraction_coeff=0.14286 memory=500 output=output95f82e0bf51f4c6298b0ebe58aff26a8 --overwrite
g.region raster=output95f82e0bf51f4c6298b0ebe58aff26a8
r.out.gdal -t -m input="output95f82e0bf51f4c6298b0ebe58aff26a8" output="/private/var/folders/7n/sjhz6lg55vj6jk7v2qt_wnmh0000gn/T/processing_0c7a62f57a39412abf265ff797e2af74/a47be9aaba4b4518827b12da6a147751/output.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Starting GRASS GIS...
Traceback (most recent call last):
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 2207, in <module>
main()
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 2143, in main
grass_gui=grass_gui)
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 1390, in lock_mapset
ret = call([gpath("etc", "lock"), lockfile, "%d" % os.getpid()])
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 247, in call
return subprocess.call(cmd, **kwargs)
File "/Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 323, in call
with Popen(*popenargs, **kwargs) as p:
File "/Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Cellar/osgeo-grass/7.6.1_5/grass76/etc/lock': '/usr/local/Cellar/osgeo-grass/7.6.1_5/grass76/etc/lock'
/Applications/QGIS3.4.app/Contents/Resources/grass7/grass76.sh: line 20: /private/var/folders/7n/sjhz6lg55vj6jk7v2qt_wnmh0000gn/T/processing_0c7a62f57a39412abf265ff797e2af74/grassdata/temp_location/PERMANENT: is a directory
Starting GRASS GIS...
Traceback (most recent call last):
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 2207, in <module>
main()
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 2143, in main
grass_gui=grass_gui)
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 1390, in lock_mapset
ret = call([gpath("etc", "lock"), lockfile, "%d" % os.getpid()])
File "/Applications/QGIS3.4.app/Contents/Resources/grass7/bin/_grass76", line 247, in call
return subprocess.call(cmd, **kwargs)
File "/Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 323, in call
with Popen(*popenargs, **kwargs) as p:
File "/Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Cellar/osgeo-grass/7.6.1_5/grass76/etc/lock': '/usr/local/Cellar/osgeo-grass/7.6.1_5/grass76/etc/lock'
/Applications/QGIS3.4.app/Contents/Resources/grass7/grass76.sh: line 20: /private/var/folders/7n/sjhz6lg55vj6jk7v2qt_wnmh0000gn/T/processing_0c7a62f57a39412abf265ff797e2af74/grassdata/temp_location/PERMANENT: is a directory
Execution completed in 0.90 seconds
Results:
{'output': <QgsProcessingOutputLayerDefinition {'sink':/private/var/folders/7n/sjhz6lg55vj6jk7v2qt_wnmh0000gn/T/processing_0c7a62f57a39412abf265ff797e2af74/a47be9aaba4b4518827b12da6a147751/output.tif, 'createOptions': {'fileEncoding': 'System'}}>}
Loading resulting layers
The following layers were not correctly generated.<ul><li>/private/var/folders/7n/sjhz6lg55vj6jk7v2qt_wnmh0000gn/T/processing_0c7a62f57a39412abf265ff797e2af74/a47be9aaba4b4518827b12da6a147751/output.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.