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

William Kyngesburye woklist at kyngchaos.com
Thu Mar 22 18:57:40 PDT 2018


I figured it out - the break in searchFolder() only breaks the cmd loop, leaving the walking to continue, eventually finding the last occurrence of the cmd.  I posted my fix to the bug report.

> On Mar 22, 2018, at 8:35 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
> 
> 
> 
> On Thu, Mar 22, 2018 at 6:56 PM, Nyall Dawson <nyall.dawson at gmail.com <mailto:nyall.dawson at gmail.com>> wrote:
> On 23 March 2018 at 08:47, William Kyngesburye <woklist at kyngchaos.com <mailto: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 <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 <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.
> 
> 
> I'm not sure what exactly you want to use os.path.isfile() for, but etc/colors/grass is a file in GRASS GIS since 7.2, so os.path.isfile() will return True. In unix, you can see if the file is executable with os.access(name, os.X_OK) (not sure if instead or in addtion to os.path.isfile()). On Windows, testing for .bat or some other extension might be the right test.
> 
> Best,
> Vaclav
>  
> 
> 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 <mailto: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 <mailto: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 <mailto: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 <http://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/ <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 <mailto:Qgis-user at lists.osgeo.org>
> >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user <https://lists.osgeo.org/mailman/listinfo/qgis-user>
> >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user <https://lists.osgeo.org/mailman/listinfo/qgis-user>
> >
> >
> >
> > -----
> > William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> > http://www.kyngchaos.com/ <http://www.kyngchaos.com/>
> >
> > All generalizations are dangerous, even this one.
> >
> >
> > _______________________________________________
> > Qgis-user mailing list
> > Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user <https://lists.osgeo.org/mailman/listinfo/qgis-user>
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user <https://lists.osgeo.org/mailman/listinfo/qgis-user>
> >
> >
> > -----
> > William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> > http://www.kyngchaos.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 <mailto:QGIS-Developer at lists.osgeo.org>
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org <mailto:QGIS-Developer at lists.osgeo.org>
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org <mailto:QGIS-Developer at lists.osgeo.org>
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know.  Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180322/4332d553/attachment-0001.html>


More information about the QGIS-Developer mailing list