[GRASS-dev] Location creation failure in docker with latest grass trunk version

Nikos Alexandris nik at nikosalexandris.net
Mon Nov 12 09:10:03 PST 2018


* Markus Metz <markus.metz.giswork at gmail.com> [2018-11-12 17:04:28 +0100]:

>On Mon, Nov 12, 2018 at 4:24 PM Nikos Alexandris <nik at nikosalexandris.net>
>wrote:
>>
>> Hi, this is maybe similar to ticket #3693 [0].
>>
>> @neteler In [0], the first example to create a Location, is performed as
>> root. Curious, why so? Why not as a simple user?
>>
>> I just try to update my grassyan Dockerfile [0] and it fails at the
>> point of creating a Location, for the sake of testing. I don't know if
>> this is relevant with what is reported in ticket #3693:
>
>In your case, it seems to be an incomplete GRASS installation, see below:

Thank you for the attention Markus!  I use the same configuration and
compilation script, locally and for the docker.  Maybe a network failure
or differences between Funtoo and Debian then.  Hmm.. or I messed too
much with ENV and variables, i.e. the "$GISBASE" one.  It must be this!

>>
>> [0] https://trac.osgeo.org/grass/ticket/3693
>> [1] https://gitlab.com/NikosAlexandris/grassyan
>>
>> ```
>> Step 47/52 : RUN grass -text -e     -c EPSG:4326
>"$GRASSDB/$TEMPORARY_MAPSET" RUN  grass -text
>"$GRASSDB/$TEMPORARY_MAPSET/PERMANENT"     --exec g.region -p
>>  ---> Running in 4dab4125dec7
>> Starting GRASS GIS...
>> Creating new GRASS GIS location <temporary_Mapset>...
>> Traceback (most recent call last):
>>   File "/usr/local/bin/grass", line 2242, in <module>
>>     main()
>>   File "/usr/local/bin/grass", line 2153, in main
>>     geofile=params.geofile, create_new=True)
>>   File "/usr/local/bin/grass", line 1046, in set_mapset
>>     create_location(gisdbase, location_name, geofile)
>>   File "/usr/local/bin/grass", line 837, in create_location
>>     from grass.script import core as gcore  # pylint: disable=E0611
>> ImportError: No module named grass.script
>
>granted that "grass" is a link to "grass77",

It is:

root at e326865a0b0e:~# ls -l /usr/local/bin/
total 1
lrwxrwxrwx 1 root root 22 Nov 12 14:58 grass -> /usr/local/bin/grass77
lrwxrwxrwx 1 root root 63 Nov 12 14:58 grass77 -> /home/grassyan/osgeo/grasstrunk/bin.x86_64-pc-linux-gnu/grass77

Nikos

>the GRASS python lib is
>missing, should be here: 'dist.x86_64-pc-linux-gnu/etc/python/grass/'
>
>another missing 'dist.x86_64-pc-linux-gnu/etc/' file:
>
>> ```
>> IOError: [Errno 2] No such file or directory:
>'dist.x86_64-pc-linux-gnu/etc/license'
>
>maybe you need to check your GRASS installation for completeness
>
>Markus M
>
>> grassyan at 2ced1e57a44e:~$ grass74 --version
>> GRASS GIS 7.4.2
>> Traceback (most recent call last):
>>   File "/usr/bin/grass74", line 2027, in <module>
>>     main()
>>   File "/usr/bin/grass74", line 1839, in main
>>     params = parse_cmdline(sys.argv[1:], default_gui=default_gui)
>>   File "/usr/bin/grass74", line 1744, in parse_cmdline
>>     message('\n' + readfile(gpath("etc", "license")))
>>   File "/usr/bin/grass74", line 229, in readfile
>>     f = open(path, 'r')
>> IOError: [Errno 2] No such file or directory:
>'dist.x86_64-pc-linux-gnu/etc/license'
>> ```
>> and
>> ```
>> grass77 -c 'epsg:4326' /home/grassyan/grassdb/test
>> Starting GRASS GIS...
>> WARNING: GRASS GUI not found. Please check your installation.
>> Switching to text based interface mode.
>>
>> Hit RETURN to continue.
>>
>>
>> Creating new GRASS GIS location <test>...
>> Traceback (most recent call last):
>>   File "/usr/local/bin/grass77", line 2242, in <module>
>>     main()
>>   File "/usr/local/bin/grass77", line 2153, in main
>>     geofile=params.geofile, create_new=True)
>>   File "/usr/local/bin/grass77", line 1046, in set_mapset
>>     create_location(gisdbase, location_name, geofile)
>>   File "/usr/local/bin/grass77", line 837, in create_location
>>     from grass.script import core as gcore  # pylint: disable=E0611
>> ImportError: No module named grass.script
>> ```
>>
>> Nikos
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-dev

-- 
Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3 


More information about the grass-dev mailing list