Bug report #19537

Still getting the /etc/colors/grass error while executing GRASS functions from the toolbox

Added by vince - about 2 years ago. Updated almost 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/GRASS
Affected QGIS version:3.2.1 Regression?:No
Operating System:Mac OS X Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:27364

Description

I’m still getting the “infamous” ‘/etc/color/grass permission denied error’ with QGis 3.2.1 and Grass 7.4.1, see below:
---

2018-08-02T21:22:11     INFO    GRASS GIS 7 execution commands
             g.proj -c proj4="+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" 
             v.external input="/var/folders/67/_hxgsxvd5jncf0y_j6hct0gc0000gn/T/processing_a3c6bd83695a4584a9fb69dbb3b4ebd8/bf923fc9c31f48abb1f16017a6ad2502/input.shp" output="vector_5b6359e36cb237" --overwrite -o
             r.external input="PG: dbname=Lyon host=localhost port=5432 mode=2 schema=public column=rast table=altilyon" band=1 output="rast_5b6359e36cc2e8" --overwrite -o
             g.region n=6526862.5 s=6511637.5 e=849587.5 w=835737.5 res=25.0
             v.extrude input=vector_5b6359e36cb237 type="point,line,area" zshift=0 height_column=hauteur elevation=rast_5b6359e36cc2e8 method="nearest" scale=1 output=output239670800fa74ec28b0690fc864c31f9 --overwrite
             v.out.ogr -c type="auto" input="output239670800fa74ec28b0690fc864c31f9" output="/var/folders/67/_hxgsxvd5jncf0y_j6hct0gc0000gn/T/processing_a3c6bd83695a4584a9fb69dbb3b4ebd8/7a5dab533f9a4bad8b18ee7ebdb4ecf1/output.shp" format="ESRI_Shapefile" --overwrite
2018-08-02T21:22:11     INFO    GRASS GIS 7 execution console output
             /var/folders/67/_hxgsxvd5jncf0y_j6hct0gc0000gn/T/processing_a3c6bd83695a4584a9fb69dbb3b4ebd8/grassdata/temp_location/PERMANENT: /opt/local/share/grass-7.4.1/etc/colors/grass: Permission denied

             /var/folders/67/_hxgsxvd5jncf0y_j6hct0gc0000gn/T/processing_a3c6bd83695a4584a9fb69dbb3b4ebd8/grassdata/temp_location/PERMANENT: /opt/local/share/grass-7.4.1/etc/colors/grass: Permission denied

---
The binary is in /opt/local/bin/grass74 and the other files are in /opt/local/share… as shown above.
Some functions, like v.centroid, or v.voronoi, work like a charm. Some, like this one, fail. This is strange. Any idea? Thanks!

History

#1 Updated by Giovanni Manghi about 2 years ago

  • Subject changed from Still getting the /etc/colors/grass error while executing Grass functions from the toolbox to Still getting the /etc/colors/grass error while executing GRASS functions from the toolbox
  • Category changed from GRASS to Processing/GRASS
  • Status changed from Open to Feedback

Don't use macOS? Just jocking.

What "still" means? that this has been a constant in QGIS 3.* (because as far as I remember from my tests on macOS on QGIS LTR 2.18 it works ok)?

#2 Updated by vince - about 2 years ago

Giovanni Manghi wrote:

Don't use macOS? Just jocking.

What "still" means? that this has been a constant in QGIS 3.* (because as far as I remember from my tests on macOS on QGIS LTR 2.18 it works ok)?

Per dir la verità, si. Non è mai stato facile far funzionare correttamente Grass attraverso la toolbox.
To be honest, yep. It’s never been easy to call Grass commands using the toolbox.

Ecco un log della mia ultima prova - here is a log of my last attempt:

Processing algorithm…
Algorithm 'v.buffer' starting…
Input parameters:
{ '-c' : False, '-s' : False, '-t' : False, 'GRASS_MIN_AREA_PARAMETER' : 0.0001, 'GRASS_OUTPUT_TYPE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'GRASS_SNAP_TOLERANCE_PARAMETER' : -1, 'GRASS_VECTOR_DSCO' : '', 'GRASS_VECTOR_LCO' : '', 'angle' : 0, 'cats' : '', 'column' : None, 'distance' : 10, 'input' : 'dbname=\'Lyon\' host=localhost port=5432 sslmode=disable key=\'gid\' srid=2154 type=MultiPolygonZM table=\"public\".\"bati\" (geom) sql=', 'minordistance' : None, 'output' : '/var/folders/hc/kc2mgvmx0_1g_6pfqbvmpfsr0000gn/T/processing_5da43a19c550454b85dd4d0556508706/d80b951a63aa468488b4907a653b93c7/output.shp', 'scale' : 1, 'tolerance' : 0.01, 'type' : [0,1,4], 'where' : '' }

g.proj -c proj4="+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" 
v.external input="/var/folders/hc/kc2mgvmx0_1g_6pfqbvmpfsr0000gn/T/processing_5da43a19c550454b85dd4d0556508706/74ef448b2cd54e7091bde4ae18f2fd49/input.shp" output="vector_5b7e85297a4fa3" --overwrite -o
g.region n=6524784.904786891 s=6513961.704437176 e=847593.8996833172 w=837752.8998626857
v.buffer input=vector_5b7e85297a4fa3 type="point,line,area" distance=10 angle=0 scale=1 tolerance=0.01 output=outputccd6003de9ce4f958fa626a870595951 --overwrite
v.out.ogr -c type="auto" input="outputccd6003de9ce4f958fa626a870595951" output="/var/folders/hc/kc2mgvmx0_1g_6pfqbvmpfsr0000gn/T/processing_5da43a19c550454b85dd4d0556508706/d80b951a63aa468488b4907a653b93c7/output.shp" format="ESRI_Shapefile" --overwrite
/var/folders/hc/kc2mgvmx0_1g_6pfqbvmpfsr0000gn/T/processing_5da43a19c550454b85dd4d0556508706/grassdata/temp_location/PERMANENT: /opt/local/share/grass-7.4.1/etc/colors/grass: Permission denied

/var/folders/hc/kc2mgvmx0_1g_6pfqbvmpfsr0000gn/T/processing_5da43a19c550454b85dd4d0556508706/grassdata/temp_location/PERMANENT: /opt/local/share/grass-7.4.1/etc/colors/grass: Permission denied

Grazie della risposta, a proposito! Ciao!
Thanks for the answer!

#3 Updated by Giovanni Manghi about 2 years ago

To be honest, yep. It’s never been easy to call Grass commands using the toolbox.
here is a log of my last attempt:

if you can try with the stable release (2.18) and prove it works then we can tag this ticket as a regression and have it as a high priority issue. I cannot test as I don't have anymore a macOS machine available.

#4 Updated by vince - about 2 years ago

Giovanni Manghi wrote:

To be honest, yep. It’s never been easy to call Grass commands using the toolbox.
here is a log of my last attempt:

if you can try with the stable release (2.18) and prove it works then we can tag this ticket as a regression and have it as a high priority issue. I cannot test as I don't have anymore a macOS machine available.

Uffa. Dovrei ri-installare Qt4 e tutti quanti. Non credo che sia possible a questo punto :( Tuttavia, sono disposto ad aggiungere trace code nel script in Python che serve ad avviare le commande, se può aiutare.
Wow. It would mean reinstalling Qt 4 and stuff. Not workable, sorry :( But I’m still willing to insert trace code into the Python script launcher, if that can help.

#5 Updated by Giovanni Manghi about 2 years ago

Wow. It would mean reinstalling Qt 4 and stuff. Not workable, sorry :(

why? there are binary installers for macOS.

#6 Updated by vince - about 2 years ago

Giovanni Manghi wrote:

Wow. It would mean reinstalling Qt 4 and stuff. Not workable, sorry :(

why? there are binary installers for macOS.

Vabbè. Smetto di scrivere in italiano.:)

Is everything packaged inside the installer? Like QGIs + Qt + Grass + …? Because installers on MacOS have the bad habit of not being bundled with an uninstaller, and I don’t want to spend a whole afternoon tracking what has been installed and where, just to erase it! :P

#7 Updated by Giovanni Manghi about 2 years ago

vince - wrote:

Giovanni Manghi wrote:

Wow. It would mean reinstalling Qt 4 and stuff. Not workable, sorry :(

why? there are binary installers for macOS.

Vabbè. Smetto di scrivere in italiano.:)

I can of course speak Italian, but it's not the right language here :)

Is everything packaged inside the installer? Like QGIs + Qt + Grass + …? Because installers on MacOS have the bad habit of not being bundled with an uninstaller, and I don’t want to spend a whole afternoon tracking what has been installed and where, just to erase it! :P

http://qgis.org/downloads/macOS/QGIS-OSX-2.18.22-1.dmg

as far as I know, is all bundled

#8 Updated by vince - about 2 years ago

Giovanni Manghi wrote:

I can of course speak Italian, but it's not the right language here :)

It’s never wrong to speak Italian :P

as far as I know, is all bundled

Okay, I installed it any tried to run a GRASS 7 command using my local installation. Here it goes:

2018-08-26T14:37:34    2    Uncaught error while executing algorithm
            Traceback (most recent call last):
              File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 203, in execute
                self.processAlgorithm(progress)
              File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 297, in processAlgorithm
                Grass7Utils.executeGrass7(self.commands, progress, self.outputCommands)
              File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Utils.py", line 298, in executeGrass7
                command, grassenv = Grass7Utils.prepareGrass7Execution(commands)
              File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Utils.py", line 289, in prepareGrass7Execution
                command = Grass7Utils.command + ' ' + os.path.join(Grass7Utils.grassMapsetFolder(), 'PERMANENT')
            TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

2018-08-26T14:37:34    1    There were errors executing the algorithm.

Apparently the script cannot find the location of the GRASS 7.4 executable, which is not located in the same directory than the binary beans (functions). Same happens with QGis 3. If I created a link 'grass74' in the directory where the beans are stored, the error disappears. I run into something else, though (I need the -text flag, otherwise grass looks for wxPython which It doesn’t find).

Okay, I figured it out: the GRASS directory specified in the dialogue box must point where the 'grass74' is located, not the bins (functions).

However I ran into another bug, so I’m going to close this one and re-open another one.

#9 Updated by vince - about 2 years ago

  • Resolution set to invalid

#10 Updated by Giovanni Manghi about 2 years ago

why invalid?

#11 Updated by Jürgen Fischer almost 2 years ago

  • Status changed from Feedback to Closed

Giovanni Manghi wrote:

why invalid?

invalid ticket.

Also available in: Atom PDF