[GRASS-dev] [GRASS GIS] #3693: Issue with G76 in docker: creating a location fails

GRASS GIS trac at osgeo.org
Sat Nov 10 02:22:58 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
 Keywords:  docker       |        CPU:  Unspecified
 Platform:  Unspecified  |
-------------------------+---------------------------------
 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.

 Not sure how relevant but the volume is mounted into docker:

 {{{
 df -h /actinia_core/grassdb/
 Filesystem                       Size  Used Avail Use% Mounted on
 /dev/mapper/wandel--app--vg-opt   19G   13G  5.3G  71%
 /actinia_core/grassdb
 }}}

 The [https://hub.docker.com/r/mundialis/grass-gis-stable/ used docker
 image] doesn't show this behaviour on a different machine.


 Attached a patch which fixes it for me; it is based on the code snippet
 proposed here: https://stackoverflow.com/a/273227

 Perhaps a better code style is possible.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3693>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list