[GRASS-dev] [GRASS GIS] #3693: Issue with G76 in docker: creating a location fails
GRASS GIS
trac at osgeo.org
Sat Nov 10 04:02:18 PST 2018
#3693: Issue with G76 in docker: creating a location fails
--------------------------+---------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.3
Component: Python | Version: svn-releasebranch76
Resolution: | Keywords: docker
CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Comment (by mmetz):
Replying to [ticket:3693 neteler]:
> while we meanwhile use GRASS GIS 7.6.svn in docker for months we ran
> into this issue:
>
> {{{
> root at 52e6935c3247:/grassdb# grass76 --text c 'EPSG:4326'
> /actinia_core/grassdb/latlongtest
> Cleaning up temporary files...
> Starting GRASS GIS...
> Creating new GRASS GIS location <latlongtest>...
> Traceback (most recent call last):
> File "/usr/local/bin/grass76", line 2162, in <module>
> main()
> File "/usr/local/bin/grass76", line 2075, in main
> geofile=params.geofile, create_new=True)
> File "/usr/local/bin/grass76", line 1005, in set_mapset
> create_location(gisdbase, location_name, geofile)
> File "/usr/local/bin/grass76", line 807, in create_location
> epsg=epsg, datum_trans=datum_trans)
> File "/usr/local/grass-7.6.svn/etc/python/grass/script/core.py",
> line 1538, in create_location
> encoding='utf-8', mode='w')
> File "/usr/lib/python2.7/codecs.py", line 898, in open
> file = __builtin__.open(filename, mode, buffering)
> IOError: [Errno 2] No such file or directory:
> '/actinia_core/grassdb/latlongtest/PERMANENT/MYNAME'
> }}}
>
> Thanks to Vaclav (https://lists.osgeo.org/pipermail/grass-
dev/2018-November/090480.html) I now understand that the mkdir part in
lib/python/script/core.py fails.
I disagree, the mapset should have been created by g.proj:
https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_6/lib/python/script/core.py#L1515
>
>
> Attached a patch which fixes it for me; it is based on the code snippet
proposed here: https://stackoverflow.com/a/273227
The patch does not create a valid mapset, it creates only an empty
directory: the files DEFAULT_WIND, PROJ_EPSG, PROJ_INFO, PROJ_UNITS, WIND
are missing.
You need to find out why g.proj called by create_location() has not
created the location with mapset PERMANENT
(/actinia_core/grassdb/latlongtest/PERMANENT)
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3693#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list