I am using grass 7.8. I have been trying to create a new location and then a new mapset in python. It works fine for any EPSG code except 4326. With EPSG 4326, when I try simple commands (like printing the region for instance) it raises an error:
"ERROR: invalid north field 1N"
I noticed that what was causing the problem is the WIND file which contains the region of the mapset. When the ESPG is 4326 then the north field gets as value "1N". When I create the mapset and location directly with GRASS GIS and without using python I have no problem in this case even though the WIND file looks exactly the same when I create the mapset with python. Does anyone have an idea about this? This is my code:
grassbin='C:\\\"Program Files\"\\\"GRASS GIS 7.8\"\\grass78.bat'
os.environ['GRASSBIN']= grassbin
from grass_session import Session
import grass.script as gscript
import grass.script.setup as gsetup
with Session(gisdb=mygisdb, location=mylocation, create_opts='EPSG:4326'):
print("Created new location")
with Session(gisdb=mygisdb, location=mylocation, mapset=mymapset, create_opts=''):
print("Created new mapset")
gsetup.init(gisbase.decode(), mygisdb, mylocation, mymapset)
gscript.run_command('g.region', flags="p")
gsetup.finish()
Invalid north field: 7191040N
for any rastr I put into grass