<div dir="ltr"><div><div><div><div>Dear Jonathan,<br><br></div>the error is due to grass_session that is not creating the location if missing.<br>I don't have time in this day to fix this issue in grass_session, so the fastest fsolution at the momenth is to check and create what is needed step by step.<br><br>I did not have xyz file to test so I've only execute g.gisenv and it works, let me know if it works also with r.inxyz:<br><br></div>```python<br>from __future__ import print_function<br>import os<br>from grass_session import Session<br>from grass.script import core as gcore<br><br>GISDBASE = "/tmp/grassdata"<br>LOCATION = "nrw"<br>EPSG = "EPSG:4326"<br><br><br>if not os.path.exists(GISDBASE):<br>    os.makedirs(GISDBASE)<br><br>if not os.path.exists(os.path.join(GISDBASE, LOCATION)):<br>    with Session(gisdb=GISDBASE, location=LOCATION,<br>                 create_opts=EPSG):<br>        print("Created a new location!")<br>else:<br>    print("Location already exist!")<br><br><br>with Session(gisdb=GISDBASE, location=LOCATION, mapset="elevation",<br>             create_opts=""):<br>    gcore.run_command("g.gisenv")<br>```<br><br></div>Best regards<br><br></div>Pietro<br></div>