<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 9, 2021 at 3:27 AM Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;" lang="NO-BOK">
<div class="gmail-m_-3003925133079186970WordSection1"><span lang="EN-US"></span>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">...I am not sure if it is feasible to throw an informative error message if users try to use GRASS functions without a running session…</span></p></div></div></blockquote><div><br></div><div>If you run without the runtime environment (modules are not on path), we could catch FileNotFoundError in grass.script.start_command() and re-raise or raise a different exception based on the presence of environmental variables (such as GISBASE) to help user debug it, although a troubleshooting or FAQ section may have the similar effect.</div><div><br></div><div>If you somehow manage to run with the runtime, but without the db/location/mapset thingy being open/current, you currently get some complaint from modules about a LOCATION variable not being defined which is cryptic, but can be improved.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" lang="NO-BOK"><div class="gmail-m_-3003925133079186970WordSection1"><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> That said, what would the gain of a pip package be? If you install GRASS you would have the functionality. If you did not install GRASS you could not use a pip package with grass-session
like functionality anyway, no?</span></p></div></div></blockquote><div><br></div><div>I don't see advantages in a pip package like this either. It would be a similar scenario as now except that the version sync is better and that it shows the weirdness of grass-session better: Let's say you build GRASS in a Docker image. Then, you run pip on part of the source code in order to make the thing you just built actually work!? Why isn't the grass-session package installation part of the build if it is needed anyway to make GRASS work?<br></div></div></div>