[GRASS-dev] Issue with G76 in docker: creating a location fails in codecs.py

Vaclav Petras wenzeslaus at gmail.com
Fri Nov 9 19:49:35 PST 2018


On Fri, Nov 9, 2018 at 6:39 PM Markus Neteler <neteler at osgeo.org> wrote:

> Hi,
>
> while we meanwhile use GRASS GIS 7.6.svn in docker for months we ran
> into this issue today:
>
> 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'
>
> ... why that?
>
> root at 52e6935c3247:/grassdb# set | grep -i utf
> LANG=C.UTF-8
> LC_ALL=en_US.UTF-8
>
> The directory is writable (I can mkdir the entire path without issues).
>
> I wonder what I should look for here?
>

For the open() to create MYNAME (mode is w),
/actinia_core/grassdb/latlongtest/PERMANENT/ needs to exist already.
Without looking to the source code, I assume that create_location() is
creating .../latlongtest/PERMANENT directories (I don't expect it actually
tests if it was successful unless the underlying Python function checks
that).

If /actinia_core/grassdb/ is a volume, I would try the same in a directory
which is not a volume. Creating minimal reproducible example would be my
next step, naive, but could help.

Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20181109/f4da1648/attachment.html>


More information about the grass-dev mailing list