Bug report #19073
QGIS3.0.x GRASS PATH problem: "ERROR: Path '/<UNKNOWN>/<UNKNOWN>' doesn't exist"
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/GRASS | ||
Affected QGIS version: | 3.0.3 | Regression?: | No |
Operating System: | Mac OS X 10.12.6 | Easy fix?: | Yes |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26903 |
Description
QGIS3.0.3 : GRASS i.segment (and many others) fail with "ERROR: Path '/<UNKNOWN>/<UNKNOWN>' doesn't exist" message.
To simplify things I tested in a new Project which contained only the one raster layer.
Sane failure occurs in all variations tested:
output to temporary files
output to specified files
skipped Goodness output
No output files are created.
Example Log Messages results (formatted for legibility):
2018-05-31T10:55:07 INFO GRASS GIS 7 execution commands
g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667
+x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"
r.external
input="/Users/garthfletcher/QGIS_TEST/DEM_Lidar/DEM_Lid_all_tiles.tif" band=1
output="rast_5b100ccb100772" --overwrite -o
g.region n=116928.0 s=67410.0 e=981480.0 w=934950.0 res=6.0
i.group group=group_5b100ccb10edd3 input=rast_5b100ccb100772
i.segment threshold=0.01 method="region_growing" similarity="euclidean"
minsize=1000 memory=300 iterations=20 group="group_5b100ccb10edd3"
output=output95fb91ab62bf4f47b0e06a8d8f666930
goodness=goodness95fb91ab62bf4f47b0e06a8d8f666930 --overwrite
g.region raster=output95fb91ab62bf4f47b0e06a8d8f666930
r.out.gdal -t -m input="output95fb91ab62bf4f47b0e06a8d8f666930"
output="/Users/garthfletcher/QGIS_TEST/DEM_Lidar/Segmented.tif"
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=goodness95fb91ab62bf4f47b0e06a8d8f666930
r.out.gdal -t -m
input="goodness95fb91ab62bf4f47b0e06a8d8f666930"
output="/Users/garthfletcher/QGIS_TEST/DEM_Lidar/Goodness.tif"
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
2018-05-31T10:55:07 INFO GRASS GIS 7 execution console output
WARNING: Default locale settings are missing. GRASS running with C locale.
Starting GRASS GIS...
ERROR: Path '/<UNKNOWN>/<UNKNOWN>' doesn't exist
Default locale not found, using UTF-8
Exiting...
Marked as "Easy fix" because I think (hope) it should be.
History
#1 Updated by Garth Fletcher over 6 years ago
To further characterize the issue I checked many other GRASS Imagery and Raster tools which seemed to be appropriate for a single DEM raster layer.
Every single one I tested failed with the same "ERROR: Path '/<UNKNOWN>/<UNKNOWN>' doesn't exist" message.
The GRASS tools tested included:
Imagery (i.*)
i.fft, i.zc
Raster (r.*)
r.buffer, r.buffer.lowmem, r.clump, r.contour, r.drain, r.fill.dir, r.flow, r.grow, r.info, r.relief, r.report, r.shade, r.slope.aspect, r.stats, r.stream.extract, r.surf.contour, r.watershed
Clearly seems to be a systematic issue with how QGIS sets up the calling environment for GRASS...
#2 Updated by Ronan L over 6 years ago
- File Capture d’écran 2018-06-04 à 07.58.00.png added
Garth Fletcher wrote:
To further characterize the issue I checked many other GRASS Imagery and Raster tools which seemed to be appropriate for a single DEM raster layer.
Every single one I tested failed with the same "ERROR: Path '/<UNKNOWN>/<UNKNOWN>' doesn't exist" message.
The GRASS tools tested included:
Imagery (i.*)
i.fft, i.zc
Raster (r.*)
r.buffer, r.buffer.lowmem, r.clump, r.contour, r.drain, r.fill.dir, r.flow, r.grow, r.info, r.relief, r.report, r.shade, r.slope.aspect, r.stats, r.stream.extract, r.surf.contour, r.watershedClearly seems to be a systematic issue with how QGIS sets up the calling environment for GRASS...
I'm not sure it is an "Easy Fix" I already reported that https://issues.qgis.org/issues/18992
I added 3 environment variables in QGIS/Preferences/Systems:
LC_ALL=fr_FR.UTF_8
TERM=xterm
PATH=/Applications/QGIS3.app/Contents/MacOS/grass:/Applications/QGIS3.app/Contents/MacOS/grass/bin:/Applications/QGIS3.app/Contents/MacOS/grass/scripts:/Library/Frameworks/GDAL.framework/Programs:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
I tried also created the missing path by entering in a terminal:
sudo mkdir -p '/<UNKNOWN>/<UNKNOWN>'
sudo chown -R Ronan /\<UNKNOWN\>
It removes all the error but GRASS still does not work…
#3 Updated by Dewey Dunnington over 6 years ago
Definitely still an issue in 3.2 (Mac OSX 10.13.4).
#4 Updated by Loïc BARTOLETTI almost 6 years ago
- Status changed from Open to Feedback
I just tested r.buffer (and others) with QGIS 3.4.3 and Grass 7.4.4 (macOS Mojave) and I have no errors. Can you confirm your problem?
#5 Updated by Garth Fletcher almost 6 years ago
- Status changed from Feedback to Open
Tested using r.contour
QGIS 3.4.3 - FAILS
QGIS 3.4.4 - FAILS
However, QGIS 3.2.2 - WORKS
=======================================
Environment
=======================================
Mac OS X 10.12.6 (Sierra)
project & data location:
/Users/garthfletcher/_QGIS_DEBUG/19073/
19073.qgs
DEM_Clip_feet_Real.tif
DEM_Clip_feet_Real.tif.aux.xml
layer info:
Name NED_Clip_Ft_3614
Path /Users/garthfletcher/_QGIS_DEBUG/19073/DEM_Clip_feet_Real.tif
CRS EPSG:3614 - NAD83 / New Hampshire (ftUS) - Projected
Extent -72.0005555551940688,41.9994444445064232 : -70.9994444448046238,43.0005555548958682
Unit feet
Width 10812
Height 10812
Data type Float32 - Thirty two bit floating point
GDAL Driver Description GTiff
GDAL Driver Metadata GeoTIFF
Dataset Description /Users/garthfletcher/_QGIS_DEBUG/19073/DEM_Clip_feet_Real.tif
=======================================
QGIS 3.4.3 {QGIS-macOS-3.4.3-1.dmg}
=======================================
QGIS version 3.4.3-Madeira
QGIS code branch Release 3.4
Compiled against Qt 5.11.2
Running against Qt 5.11.2
Compiled against GDAL/OGR 2.3.2
Running against GDAL/OGR 2.3.3
Compiled against GEOS 3.7.0-CAPI-1.11.0
Running against GEOS 3.7.1-CAPI-1.11.1 27a5e771
PostgreSQL Client Version 9.6.10
SpatiaLite Version 4.4.0-RC1
QWT Version 6.1.3
QScintilla2 Version 2.10.8
PROJ.4 Version 493
---------------------------------------
r.contour
---------------------------------------
2019-01-29T10:25:59 INFO GRASS GIS 7 execution commands
g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"
r.external input="/Users/garthfletcher/_QGIS_DEBUG/19073/DEM_Clip_feet_Real.tif" band=1 output="rast_5c507086f23043" --overwrite -o
g.region n=43.00055555489587 s=41.99944444450642 e=-70.99944444480462 w=-72.00055555519407 res=9.259259252584582e-05
r.contour input=rast_5c507086f23043 step=10 cut=0 output=output28b818f9c2bd4190ae5ba8c9822b7554 --overwrite
v.out.ogr -c type="auto" input="output28b818f9c2bd4190ae5ba8c9822b7554" output="/var/folders/h5/jbjhn4xs6x37xt_2m6x2nkbm0000gp/T/processing_459afd8822914dd482e153f7180badbd/758918b4f6694fcfa76bd14bb13489ac/output.gpkg" format="GPKG" --overwrite
2019-01-29T10:26:00 INFO GRASS GIS 7 execution console output
WARNING: Default locale settings are missing. GRASS running with C locale.
Default locale not found, using UTF-8
Traceback (most recent call last):
File "/Applications/QGIS_3_4_3-1.app/Contents/MacOS/grass/grass74", line 2029, in
main()
File "/Applications/QGIS_3_4_3-1.app/Contents/MacOS/grass/grass74", line 1880, in main
set_paths(grass_config_dir=grass_config_dir)
File "/Applications/QGIS_3_4_3-1.app/Contents/MacOS/grass/grass74", line 622, in set_paths
os.environ['MANPATH'] = sys_man_path
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 674, in setitem
value = self.encodevalue(value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 744, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not bytes
WARNING: Default locale settings are missing. GRASS running with C locale.
Default locale not found, using UTF-8
Traceback (most recent call last):
File "/Applications/QGIS_3_4_3-1.app/Contents/MacOS/grass/grass74", line 2029, in
main()
File "/Applications/QGIS_3_4_3-1.app/Contents/MacOS/grass/grass74", line 1880, in main
set_paths(grass_config_dir=grass_config_dir)
File "/Applications/QGIS_3_4_3-1.app/Contents/MacOS/grass/grass74", line 622, in set_paths
os.environ['MANPATH'] = sys_man_path
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 674, in setitem
value = self.encodevalue(value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 744, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not bytes
=======================================
QGIS 3.4.4 {QGIS-macOS-3.4.4-2.dmg}
=======================================
---------------------------------------
r.contour
---------------------------------------
2019-01-29T10:30:54 INFO GRASS GIS 7 execution commands
g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"
r.external input="/Users/garthfletcher/_QGIS_DEBUG/19073/DEM_Clip_feet_Real.tif" band=1 output="rast_5c5071addc3b92" --overwrite -o
g.region n=43.00055555489587 s=41.99944444450642 e=-70.99944444480462 w=-72.00055555519407 res=9.259259252584582e-05
r.contour input=rast_5c5071addc3b92 step=10 cut=0 output=output9279ebf267434000a9b9c4e376e6fc34 --overwrite
v.out.ogr -c type="auto" input="output9279ebf267434000a9b9c4e376e6fc34" output="/var/folders/h5/jbjhn4xs6x37xt_2m6x2nkbm0000gp/T/processing_dcea3eb2a1194b6f8f457c9b1a00d2fa/b8c50846e5344acfa8c1443a1b10617e/output.gpkg" format="GPKG" --overwrite
2019-01-29T10:30:55 INFO GRASS GIS 7 execution console output
WARNING: Default locale settings are missing. GRASS running with C locale.
Default locale not found, using UTF-8
Traceback (most recent call last):
File "/Applications/QGIS_3_4_4-2.app/Contents/MacOS/grass/grass74", line 2029, in
main()
File "/Applications/QGIS_3_4_4-2.app/Contents/MacOS/grass/grass74", line 1880, in main
set_paths(grass_config_dir=grass_config_dir)
File "/Applications/QGIS_3_4_4-2.app/Contents/MacOS/grass/grass74", line 622, in set_paths
os.environ['MANPATH'] = sys_man_path
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 674, in setitem
value = self.encodevalue(value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 744, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not bytes
WARNING: Default locale settings are missing. GRASS running with C locale.
Default locale not found, using UTF-8
Traceback (most recent call last):
File "/Applications/QGIS_3_4_4-2.app/Contents/MacOS/grass/grass74", line 2029, in
main()
File "/Applications/QGIS_3_4_4-2.app/Contents/MacOS/grass/grass74", line 1880, in main
set_paths(grass_config_dir=grass_config_dir)
File "/Applications/QGIS_3_4_4-2.app/Contents/MacOS/grass/grass74", line 622, in set_paths
os.environ['MANPATH'] = sys_man_path
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 674, in setitem
value = self.encodevalue(value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 744, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not bytes
=======================================
QGIS 3.2.2 {QGIS-macOS-3.2.1-1.dmg}
=======================================
QGIS version 3.2.2-Bonn
QGIS code branch Release 3.2
Compiled against Qt 5.9.6
Running against Qt 5.9.6
Compiled against GDAL/OGR 2.2.4
Running against GDAL/OGR 2.2.4
Compiled against GEOS 3.6.2-CAPI-1.10.2
Running against GEOS 3.7.1-CAPI-1.11.1 27a5e771
PostgreSQL Client Version 9.6.6
SpatiaLite Version 4.4.0-RC1
QWT Version 6.1.3
QScintilla2 Version 2.10.7
PROJ.4 Version 493
---------------------------------------
r.contour
---------------------------------------
NOTE: could not use 10' increments parameter because of bug {always requires
listed intervals), so used levels list of 100,200,300,...1000,1100.
Runs perfectly, creates contour layer
2019-01-29T10:47:22 INFO GRASS GIS 7 execution commands
g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"
r.external input="/Users/garthfletcher/_QGIS_DEBUG/19073/DEM_Clip_feet_Real.tif" band=1 output="rast_5c507589e372a3" --overwrite -o
g.region n=43.00055555489587 s=41.99944444450642 e=-70.99944444480462 w=-72.00055555519407 res=9.259259252584582e-05
r.contour input=rast_5c507589e372a3 levels="100,200,300,400,500,600,700,800,900,1000,1100" cut=0 output=output2810dd43b6594ffea99e5b82135a3210 --overwrite
v.out.ogr -c type="auto" input="output2810dd43b6594ffea99e5b82135a3210" output="/var/folders/h5/jbjhn4xs6x37xt_2m6x2nkbm0000gp/T/processing_f8e02470e9554a2b844d087c850b1aa4/093bde2c618a4bfea46fa86f5fc0e144/output.shp" format="ESRI_Shapefile" --overwrite
2019-01-29T10:47:46 INFO GRASS GIS 7 execution console output
WARNING: Default locale settings are missing. GRASS running with C locale.
Starting GRASS GIS...
Executing ...
Default region was updated to the new projection, but if you have multiple mapsets `g.region -d` should be run in each to update the region from the default
Projection information updated
WARNING: Over-riding projection check
Reading band 1 of 1...
r.external complete. Link to raster map created.
Reading data...
2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100
Displacing data...
2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100
Writing vector contours (total levels 9)...
11..22..33..44..55..66..77..88..100
WARNING: 146 crossings found
Writing attributes...
Building topology for vector map ...
Registering primitives...
912 primitives registered
422588 vertices registered
Building areas...
0..2..4..6..8..10..12..14..16..18..20..22..24..26..28..30..32..34..36..38..40..42..44..46..48..50..52..54..56..58..60..62..64..66..68..70..72..74..76..78..80..82..84..86..88..90..92..94..96..98..100
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
1..3..5..7..9..11..13..15..17..19..21..23..25..27..29..31..33..35..37..39..41..43..45..47..49..51..53..55..57..59..61..63..65..67..69..71..73..75..77..79..81..83..85..87..89..91..93..95..97..99..100
Number of nodes: 912
Number of primitives: 912
Number of points: 0
Number of lines: 912
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
Exporting 912 features...
5..11..17..23..29..35..41..47..53..59..65..71..77..83..89..95..100
v.out.ogr complete. 912 features (Line String type) written to (ESRI_Shapefile format).
Execution of finished.
Cleaning up temporary files...
Default locale not found, using UTF-8
#6 Updated by Garth Fletcher almost 6 years ago
Did fresh install on a Mojave system
r.contour fails here too.
=======================================
Mac OS X 10.14.2 (Mojave)
=======================================
QGIS nstalled using
python-3.6.8-macosx10.9.pkg
QGIS-macOS-3.4.4-2.dmg, Python
QGIS version 3.4.3-Madeira
QGIS code revision 2f64a3c4e7
Compiled against Qt 5.12.0
Running against Qt 5.12.0
Compiled against GDAL/OGR 2.3.2
Running against GDAL/OGR 2.3.2
Compiled against GEOS 3.7.1-CAPI-1.11.1
Running against GEOS 3.7.1-CAPI-1.11.1 27a5e771
PostgreSQL Client Version 11.1
SpatiaLite Version 4.3.0a
QWT Version 6.1.3
QScintilla2 Version 2.10.4
Compiled against PROJ 520
Running against PROJ 5.2.0
---------------------------------------
r.contour
---------------------------------------
2019-01-29T11:45:13 INFO GRASS GIS 7 execution commands
g.proj -c proj4="+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"
r.external input="/Users/garth/_QGIS_DEBUG/19073/DEM_Clip_feet_Real.tif" band=1 output="rast_5c508319051662" --overwrite -o
g.region n=43.00055555489587 s=41.99944444450642 e=-70.99944444480462 w=-72.00055555519407 res=9.259259252584582e-05
r.contour input=rast_5c508319051662 step=10 cut=0 output=output00ae4260d3ae4245b7e47271b4b00e7b --overwrite
v.out.ogr -c type="auto" input="output00ae4260d3ae4245b7e47271b4b00e7b" output="/private/var/folders/p6/rpylzgrn58351tnnnvmdkgz40000gn/T/processing_261a176dc9074e7099be2a670a13c90a/da65922f7dca42d8ae17eb362ae486fb/output.gpkg" format="GPKG" --overwrite
2019-01-29T11:45:13 INFO GRASS GIS 7 execution console output
/Applications/QGIS3.4.3.app/Contents/Resources/grass7/bin/grass74: line 5: /usr/local/Cellar/grass7/7.4.3_3/libexec/bin/grass74: No such file or directory
/Applications/QGIS3.4.3.app/Contents/Resources/grass7/bin/grass74: line 5: exec: /usr/local/Cellar/grass7/7.4.3_3/libexec/bin/grass74: cannot execute: No such file or directory
/Applications/QGIS3.4.3.app/Contents/Resources/grass7/bin/grass74: line 5: /usr/local/Cellar/grass7/7.4.3_3/libexec/bin/grass74: No such file or directory
/Applications/QGIS3.4.3.app/Contents/Resources/grass7/bin/grass74: line 5: exec: /usr/local/Cellar/grass7/7.4.3_3/libexec/bin/grass74: cannot execute: No such file or directory