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

Markus Neteler neteler at osgeo.org
Sat Nov 10 00:03:09 PST 2018


Hi

Am Sa., 10. Nov. 2018, 04:39 hat Vaclav Petras <wenzeslaus at gmail.com>
geschrieben:

>
>
> 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.
>

I see. But I'm using -c (user point of view).

Maybe we need this solution?
https://stackoverflow.com/a/273227


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.
>

It is a volume outside the docker and mounted inside.

Creating minimal reproducible example would be my next step, naive, but
> could help.
>


The same docker image [1] doesn't show this behavior on a different machine.

[1]  (ok the repo name is anticipating the near future :) )
https://hub.docker.com/r/mundialis/grass-gis-stable/

I'll try a bit more.

Markus


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


More information about the grass-dev mailing list