<div dir="ltr"><div>Hi Enrico, <br></div><div></div><div><div><br></div><div>GRASS 7.6 is the last using python 2, and in 7.8 we moved to python 3, though still supporting python 2. Could that be a problem?</div></div><div><br></div><div>What about compiling GRASS 7.8+ if not in the Debian stable repos? <br></div><div> <a href="https://grasswiki.osgeo.org/wiki/Compile_and_Install#Debian">https://grasswiki.osgeo.org/wiki/Compile_and_Install#Debian</a></div><div><br></div><div>my 0.2 cents</div><div>Vero<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun, 8 mar 2021 a las 11:37, Enrico Gabrielli bonushenricus (<<a href="mailto:bonushenricus76@gmail.com">bonushenricus76@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks<br>
some problems:<br>
> File "/home/bonushenricus/.grass7/addons/scripts/r.slope.d<br>
> irection.py", line 291, in <module><br>
> options, flags = gscript.parser()<br>
> File "/usr/lib/grass76/etc/python/grass/script/core.py",<br>
> line 800, in parser<br>
> return _parse_opts(lines[1:])<br>
> File "/usr/lib/grass76/etc/python/grass/script/core.py",<br>
> line 751, in _parse_opts<br>
> os.environ[var] = val<br>
> File "/usr/lib/python3.7/os.py", line 682, in __setitem__<br>
> key = self.encodekey(key)<br>
> File "/usr/lib/python3.7/os.py", line 753, in encode<br>
> raise TypeError("str expected, not %s" %<br>
> type(value).__name__)<br>
> TypeError: str expected, not bytes<br>
It seems that the files are all there, but perhaps they must be<br>
updated. That's pity. Alternatively I will use MAPCALC with<br>
ABS (ATAN (TAN (slope) * COS (aspect - raster_direction)))<br>
but unfortunately with an extra passage and without the possibility of<br>
defining calculation steps.<br>
<br>
<br>
Il giorno lun, 08/03/2021 alle 09.04 +0000, Stefan Blumentrath ha<br>
scritto:<br>
> Hm, maybe some fixes for g.extension should be backported to 7.6...<br>
> <br>
> Anyway, as a workaround, you can just save the python script from (as<br>
> r.slope.direction <br>
> <a href="https://raw.githubusercontent.com/OSGeo/grass-addons/master/grass7/raster/r.slope.direction/r.slope.direction.py" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/OSGeo/grass-addons/master/grass7/raster/r.slope.direction/r.slope.direction.py</a><br>
> ) to:<br>
> ~/.grass7/addons/scripts/<br>
> <br>
> Then make it executable:<br>
> chmod u+x ~/.grass7/addons/scripts/r.slope.direction<br>
> <br>
> And it should work...<br>
> <br>
> Cheers<br>
> Stefan<br>
> <br>
> -----Original Message-----<br>
> From: Enrico Gabrielli bonushenricus <<a href="mailto:bonushenricus76@gmail.com" target="_blank">bonushenricus76@gmail.com</a>> <br>
> Sent: mandag 8. mars 2021 09:44<br>
> To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>>; <br>
> <a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
> Subject: Re: [GRASS-user] KEYLINE; installing new module add-on (of<br>
> 7.8) in GRASS 7.6<br>
> <br>
> Hi Stefan<br>
> and thanks<br>
> Thanks to all and all developers! And here I have the answer directly<br>
> from those who have developed R-Slope.Direction, no ??<br>
> Here's what happens:<br>
> > g.extension extension=r.slope.direction<br>
> > operation=add <br>
> > Fetching <r.slope.direction> from GRASS GIS Addons repository (be <br>
> > patient)...<br>
> > ERROR: Extension <r.slope.direction> not found<br>
> <br>
> Il giorno lun, 08/03/2021 alle 08.38 +0000, Stefan Blumentrath ha<br>
> scritto:<br>
> > Hi Enrico,<br>
> > <br>
> > GRASS 7.6 should not be a limiting factor. Did you try to install<br>
> > the <br>
> > addon through g.extension?<br>
> > <br>
> > g.extension extension=r.slope.direction operation=add<br>
> > <br>
> > If not, please try. If you did but get an error message, please <br>
> > provide the error message you got...<br>
> > <br>
> > Cheers<br>
> > Stefan<br>
> > <br>
> > <br>
> > -----Original Message-----<br>
> > From: grass-user <<a href="mailto:grass-user-bounces@lists.osgeo.org" target="_blank">grass-user-bounces@lists.osgeo.org</a>> On Behalf Of <br>
> > Enrico Gabrielli bonushenricus<br>
> > Sent: søndag 7. mars 2021 23:59<br>
> > To: <a href="mailto:grass-italia@listserv.unipr.it" target="_blank">grass-italia@listserv.unipr.it</a>; <a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
> > Subject: [GRASS-user] KEYLINE; installing new module add-on (of<br>
> > 7.8) <br>
> > in GRASS 7.6<br>
> > <br>
> > Hello everyone and everyone.<br>
> > I write maybe once every one or two years!<br>
> > I am a geographer and agricultural consultant.<br>
> > I am using GRASS to design in KeyLine (you can easily find news<br>
> > about <br>
> > this ingenious technique, which is also the basis of permaculture,<br>
> > on <br>
> > the internet).<br>
> > I found that in GRASS 7.8 there is a new add-on module called <br>
> > r.slope.direction which would be very useful for keyline designs.<br>
> > Unfortunately I use Debian stable, and therefore GRASS 7.6.<br>
> > I have tried to use the r.slope.direction source script which I<br>
> > find <br>
> > here<br>
> > <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith" rel="noreferrer" target="_blank">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith</a><br>
> > <a href="http://ub.com" rel="noreferrer" target="_blank">ub.com</a>%2FOSGeo%2Fgrass-<br>
> > addons%2Ftree%2Fmaster%2Fgrass7%2Fraster%2Fr.sl<br>
> > ope.direction&data=04%7C01%7C%7C6f03009d912c4bed9a9e08d8e20e5a2<br>
> > 0%7<br>
> > C6cef373021314901831055b3abf02c73%7C0%7C0%7C637507898555085492%7CUn<br>
> > kno<br>
> > wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW<br>
> > wiL<br>
> > CJXVCI6Mn0%3D%7C1000&sdata=QpindTE6R0zQP6ArlP9rc2d3nFOYLMHhwtDn<br>
> > iM8<br>
> > EksA%3D&reserved=0 but can't use it. If I install it following<br>
> > the <br>
> > instructions I find here<br>
> > <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgras" rel="noreferrer" target="_blank">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgras</a><br>
> > <a href="http://swiki.osgeo.org" rel="noreferrer" target="_blank">swiki.osgeo.org</a>%2Fwiki%2FGRASS_and_Python%23Installation&data=0<br>
> > 4%7<br>
> > C01%7C%7C6f03009d912c4bed9a9e08d8e20e5a20%7C6cef373021314901831055b<br>
> > 3ab<br>
> > f02c73%7C0%7C0%7C637507898555085492%7CUnknown%7CTWFpbGZsb3d8eyJWIjo<br>
> > iMC<br>
> > 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&<br>
> > ;sd<br>
> > ata=1%2BzzVwsIW7mBcsBvuI%2Bvt2c7yULb%2B2oioSZCcAH1yUU%3D&reserv<br>
> > ed=<br>
> > 0 it gives me several errors. I created the directory in / usr /<br>
> > lib /<br>
> > grass76 / scripts /<br>
> > I can attach the result of the terminal.<br>
> > But if you think that it is simply not easy to install in GRASS 7.6<br>
> > it <br>
> > will mean that I will be looking forward to Debian 11 (I never<br>
> > install<br>
> > testing)<br>
> > --<br>
> > Perito agrario Enrico Gabrielli<br>
> > Tessera n. 633 Collegio Periti agrari prov. Di Modena Biblioteca<br>
> > agricoltura: <br>
> > <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww" rel="noreferrer" target="_blank">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww</a>.<br>
> > <a href="http://zotero.org" rel="noreferrer" target="_blank">zotero.org</a>%2Fgroups%2Faplomb%2F&data=04%7C01%7C%7C6f03009d912c4<br>
> > bed<br>
> > 9a9e08d8e20e5a20%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C63750<br>
> > 789<br>
> > 8555085492%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2lu<br>
> > MzI<br>
> > iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kW8u9MG0ZAcaWy%2BW<br>
> > nII<br>
> > C%2F8KEZrchtuvGzZt0KegMGDg%3D&reserved=0<br>
> > <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fit.l" rel="noreferrer" target="_blank">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fit.l</a><br>
> > <a href="http://inkedin.com" rel="noreferrer" target="_blank">inkedin.com</a>%2Fpub%2Fenrico-<br>
> > gabrielli%2F9a%2F186%2F159&data=04%7C01<br>
> > %7C%7C6f03009d912c4bed9a9e08d8e20e5a20%7C6cef373021314901831055b3ab<br>
> > f02<br>
> > c73%7C0%7C0%7C637507898555085492%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC<br>
> > 4wL<br>
> > jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sd<br>
> > ata<br>
> > =%2BudmXF9XutKPUBRmxCFM0J6Y1vUjy00sgNHxN4sea4Y%3D&reserved=0<br>
> > <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fenri" rel="noreferrer" target="_blank">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fenri</a><br>
> > <a href="http://cogabrielli76.wordpress.com" rel="noreferrer" target="_blank">cogabrielli76.wordpress.com</a>%2F&data=04%7C01%7C%7C6f03009d912c4b<br>
> > ed9<br>
> > a9e08d8e20e5a20%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637507<br>
> > 898<br>
> > 555095485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM<br>
> > zIi<br>
> > LCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ln9qjq1Zp3rZOOE9aGm<br>
> > GAs<br>
> > %2BLDMytIfH1QY6jYF%2FNjDg%3D&reserved=0<br>
> > <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww" rel="noreferrer" target="_blank">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww</a>.<br>
> > <a href="http://inaturalist.org" rel="noreferrer" target="_blank">inaturalist.org</a>%2Fobservations%2Fbonushenricus&data=04%7C01%7C%<br>
> > 7C6<br>
> > f03009d912c4bed9a9e08d8e20e5a20%7C6cef373021314901831055b3abf02c73%<br>
> > 7C0<br>
> > %7C0%7C637507898555095485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM<br>
> > DAi<br>
> > LCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jT5<br>
> > gKt<br>
> > czQ1yxYVfm7eiUGlHFbzjUktUJFU6zynjGZPM%3D&reserved=0<br>
> > skype: enricogabrielli (<a href="mailto:enricogabrielli76.peragr@gmail.com" target="_blank">enricogabrielli76.peragr@gmail.com</a>)<br>
> > <br>
> > _______________________________________________<br>
> > grass-user mailing list<br>
> > <a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
> > <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist" rel="noreferrer" target="_blank">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist</a><br>
> > <a href="http://s.osgeo.org" rel="noreferrer" target="_blank">s.osgeo.org</a>%2Fmailman%2Flistinfo%2Fgrass-<br>
> > user&data=04%7C01%7C%7C6f<br>
> > 03009d912c4bed9a9e08d8e20e5a20%7C6cef373021314901831055b3abf02c73%7<br>
> > C0%<br>
> > 7C0%7C637507898555095485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD<br>
> > AiL<br>
> > CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2Bh<br>
> > k3a<br>
> > uCu5tEI6v3nZBKwWPzrw%2F48XwetrtW9lEwTOj8%3D&reserved=0<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote></div>