[QGIS-Developer] [Qgis-user] Mac QGIS 3 GRASS fix

William Kyngesburye woklist at kyngchaos.com
Thu Mar 22 18:34:12 PDT 2018


Yes, that looks like the source of the problem.  The os.walk() finds the color file named "grass" before it has a chance to find the real "grass72" file at the top level of the grasspath.  Though this is odd since it looks like os.walk by default should return a folder's info before it walks subfolders.

I don't think a file check will help, since it finds a file from the returned files list.  I do think the walking the whole grasspath tree is excessive.

> On Mar 22, 2018, at 5:56 PM, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> 
> On 23 March 2018 at 08:47, William Kyngesburye <woklist at kyngchaos.com> wrote:
>> Well, it seems that running any GRASS Processing coughs up this error.
>> Mystery to me, permissions are correct for the app, nothing should be
>> writing to the app, and if it is trying that's wrong.
>> 
>> The error doesn't help me try to figure out what's going on.  Help would be
>> appreciated.
> 
> 
> I believe it's this bug:
> 
> https://issues.qgis.org/issues/17555
> 
> The permission errors is caused because it's actually trying to
> execute /Applications/QGIS3.app/Contents/MacOS/grass/etc/colors/grass
> instead of the correct grass binary.
> 
> The bug is caused by this function:
> 
> https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/grass7/Grass7Utils.py#L130
> 
> It's trying to automatically generate the grass executable path, but
> it's incorrectly finding the colors/grass folder and deciding that
> it's the grass executable. I think inserting a os.path.isfile check
> somewhere around line 145 should fix this, but not having access to an
> osx install I haven't been able to test this.
> 
> Hope that helps -- would be great to have this one sorted for 3.0.1 if
> you can confirm a fix!
> 
> Nyall
> 
>> 
>> On Mar 22, 2018, at 1:10 PM, William Kyngesburye <woklist at kyngchaos.com>
>> wrote:
>> 
>> What are you doing?  GRASS plugin tools or Processing GRASS algorithms?
>> 
>> Nothing should be trying to write to the GRASS dir.  There should not be
>> permissions problem reading from the GRASS dir.
>> 
>> On Mar 22, 2018, at 11:00 AM, jehdukeegr at gmail.com wrote:
>> 
>> Thanks William.  I'm still getting some sort of error using grass.  Not sure
>> if this is still related.
>> 
>> /var/folders/d3/q41sw4cj5_s479lpjf1z3hwc0000gn/T/processing_7fd31b05f63f437c84dee066f864d9f9/grassdata/temp_location/PERMANENT:
>> /Applications/QGIS3.app/Contents/MacOS/grass/etc/colors/grass: Permission
>> denied
>> /var/folders/d3/q41sw4cj5_s479lpjf1z3hwc0000gn/T/processing_7fd31b05f63f437c84dee066f864d9f9/grassdata/temp_location/PERMANENT:
>> /Applications/QGIS3.app/Contents/MacOS/grass/etc/colors/grass: Permission
>> denied
>> 
>> 
>> 
>> 
>> On Thu, Mar 22, 2018 at 8:36 AM, William Kyngesburye <woklist at kyngchaos.com>
>> wrote:
>>> 
>>> The non-working GRASS in the Mac QGIS 3 should be fixed now.  It appears
>>> the GRASS internals still don't like spaces in the path to GRASS -- this
>>> came from my adding "3" to the QGIS app name with a space.  The app is now
>>> without a space, "QGIS3.app".
>>> 
>>> It looks like the missing SAGA is also fixed by the rebuild (don't know
>>> why, it just happened).
>>> 
>>> REMINDER: My QGIS 3 package requires the python.org Python 3.  Other
>>> distributions/installations of Python are not supported (ie Homebrew,
>>> Macports, Anaconda...).
>>> 
>>> -----
>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>> http://www.kyngchaos.com/
>>> 
>>> [Trillian]  What are you supposed to do WITH a maniacally depressed robot?
>>> 
>>> [Marvin]  You think you have problems?  What are you supposed to do if you
>>> ARE a maniacally depressed robot?  No, don't try and answer, I'm 50,000
>>> times more intelligent than you and even I don't know the answer...
>>> 
>>> - HitchHiker's Guide to the Galaxy
>>> 
>>> 
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> 
>> 
>> 
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>> 
>> All generalizations are dangerous, even this one.
>> 
>> 
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> 
>> 
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>> 
>> "We are at war with them. Neither in hatred nor revenge and with no
>> particular pleasure I shall kill every ___ I can until the war is over. That
>> is my duty."
>> 
>> "Don't you even hate 'em?"
>> 
>> "What good would it do if I did? If all the many millions of people of the
>> allied nations devoted an entire year exclusively to hating the ____ it
>> wouldn't kill one ___ nor shorten the war one day."
>> 
>> <Ha, ha> "And it might give 'em all stomach ulcers."
>> 
>> - Tarzan, on war
>> 
>> 
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings.  And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan




More information about the QGIS-Developer mailing list