-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with core.py #8
Comments
Dear @andrew-plowright , sorry for the delay, I think you believe to use python37, but actually the osgeo grass binary file is using python27.
Let me know the result. |
Hi @zarch . No worries. I can confirm that I've set all the environment variables to ensure that Python37 is being used:
|
GRASS 7.8 will be the first version with support for Python 3. So, I would say this is no grass-session issue. @andrew-plowright, please test the release candidate that will be made available the next days... |
FYI: Meanwhile GRASS GIS 7.8.0 with Python 3 support is out |
Thanks for the update! |
Hello. I've been able to get
grass.script
running in a Python script usinggrass_session
. I have encountered one issue when using OSGeo4W, which I've been able to solve by using a very inelegant solution. I am wondering if this could be solved by updatinggrass_session
?I am using version 7.4.2 of grass, installed with the latest version of OSGeo in Windows. My Python script contains the following code:
I am calling it from the command line using the Python37 interpreter that comes with Osgeo. I set the following environmental variables first.
This produces the following error:
I did some digging and, as the error message suggests, the problem lies within
\grass-7.4.2\etc\python\grass\script\core.py
. After having made a back-up, I changed the lines 37-45 of this file from this:To this:
After having made this change, everything works. I don't entirely understand why, but obviously having to edit grass files is not a great solution. Do you know if this is something that can be resolved using
grass_session
, or by perhaps changing some environmental variables that I wasn't aware of?Thank you for your time
The text was updated successfully, but these errors were encountered: