[GRASS-dev] [GRASS GIS] #3656: cannot launch GRASS GIS 7.4.1 gis_set error

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
---------------------------+-------------------------
Reporter: cgarzon | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: 7.4.0
Keywords: gis_set error | CPU: Unspecified
Platform: MacOSX |
---------------------------+-------------------------
I have the following problem: When I try to open GRASS GIS 7.4.1 (or
7.4.0) I get "Gis_set error 'es_CO' cannot be set" and the program
immediately shuts down. I have a Mac OS High Sierra 10.13.6. This is the
error message I get:

Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Default locale not found, using UTF-8
WARNING: Default locale settings are missing. GRASS running with C locale.
Cleaning up temporary files...
access: No such file or directory
ERROR: LOCALIZACIÓN </Users/Gabriela/Documents/Los
        Andes/Biología/grassdata/nc_spm_08_grass7> no disponible
Starting GRASS GIS...
Traceback (most recent call last):
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 1236, in OnInit
     StartUp = GRASSStartup()
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 233, in __init__
     self._set_properties(grassVersion, grassRevisionStr)
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 286, in _set_properties
     self.OnSetDatabase(None)
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 985, in OnSetDatabase
     self._showError(_("Path '%s' doesn't exist.") % gisdbase)
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 511, in _showError
     self.lmessage.SetLabel(_("Error: {text}").format(text=text))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in
position 48: ordinal not in range(128)
OnInit returned false, exiting...

Carol.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------
Changes (by neteler):

* keywords: gis_set error => gis_set error, python
* component: Default => Startup
* milestone: => 7.4.2

Old description:

I have the following problem: When I try to open GRASS GIS 7.4.1 (or
7.4.0) I get "Gis_set error 'es_CO' cannot be set" and the program
immediately shuts down. I have a Mac OS High Sierra 10.13.6. This is the
error message I get:

Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Default locale not found, using UTF-8
WARNING: Default locale settings are missing. GRASS running with C
locale.
Cleaning up temporary files...
access: No such file or directory
ERROR: LOCALIZACIÓN </Users/Gabriela/Documents/Los
       Andes/Biología/grassdata/nc_spm_08_grass7> no disponible
Starting GRASS GIS...
Traceback (most recent call last):
  File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 1236, in OnInit
    StartUp = GRASSStartup()
  File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 233, in __init__
    self._set_properties(grassVersion, grassRevisionStr)
  File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 286, in _set_properties
    self.OnSetDatabase(None)
  File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 985, in OnSetDatabase
    self._showError(_("Path '%s' doesn't exist.") % gisdbase)
  File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 511, in _showError
    self.lmessage.SetLabel(_("Error: {text}").format(text=text))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in
position 48: ordinal not in range(128)
OnInit returned false, exiting...

Carol.

New description:

I have the following problem: When I try to open GRASS GIS 7.4.1 (or
7.4.0) I get "Gis_set error 'es_CO' cannot be set" and the program
immediately shuts down. I have a Mac OS High Sierra 10.13.6. This is the
error message I get:

{{{
Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Default locale not found, using UTF-8
WARNING: Default locale settings are missing. GRASS running with C locale.
Cleaning up temporary files...
access: No such file or directory
ERROR: LOCALIZACIÓN </Users/Gabriela/Documents/Los
        Andes/Biología/grassdata/nc_spm_08_grass7> no disponible
Starting GRASS GIS...
Traceback (most recent call last):
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 1236, in OnInit
     StartUp = GRASSStartup()
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 233, in __init__
     self._set_properties(grassVersion, grassRevisionStr)
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 286, in _set_properties
     self.OnSetDatabase(None)
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 985, in OnSetDatabase
     self._showError(_("Path '%s' doesn't exist.") % gisdbase)
   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 511, in _showError
     self.lmessage.SetLabel(_("Error: {text}").format(text=text))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in
position 48: ordinal not in range(128)
OnInit returned false, exiting...
}}}

Carol.

--

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by neteler):

Does the path `/Users/Gabriela/Documents/ .... /nc_spm_08_grass7` contain
a white space?
From the error message above that's not clear (not your fault!).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cgarzon):

Yes, it does. It is

/Users/Gabriela/Documents/Los Andes/Biología/grassdata/nc_spm_08_grass7

it shouldn't have?

Thanks!

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by neteler):

Replying to [comment:3 cgarzon]:
> Yes, it does. It is
>
> /Users/Gabriela/Documents/Los Andes/Biología/grassdata/nc_spm_08_grass7
>
> it shouldn't have?

It is not recommended (should work yes but who knows...).

But more likely the "í" in "Biología" is causing troubles in 7.4.1. Could
you please change that word to one without "í", try again and report?
Thanks

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cgarzon):

The folders name was changed from Biología to biologia and Los Andes to
losandes with no spaces. We installed a previous version of GRASS 7.2.2
and there is still an error:

/Applications/GRASS-7.2.2.app/Contents/MacOS/Grass.sh
MacBook-Pro-de-Gabriela-2:~ Gabriela$
/Applications/GRASS-7.2.2.app/Contents/MacOS/Grass.sh
Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Traceback (most recent call last):
   File "/Applications/GRASS-7.2.2.app/Contents/Resources/bin/grass72",
line 54, in <module>
     ENCODING = locale.getdefaultlocale()[1]
   File
"/Applications/GRASS-7.2.2.app/Contents/Resources/lib/python2.7/locale.py",
line 545, in getdefaultlocale
     return _parse_localename(localename)
   File
"/Applications/GRASS-7.2.2.app/Contents/Resources/lib/python2.7/locale.py",
line 477, in _parse_localename
     raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cgarzon):

also we reinstalled the GRASS GIS 7.4.1 and we get the same error:

  ", line 233, in __init__

     self._set_properties(grassVersion, grassRevisionStr)

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 286, in _set_properties

     self.OnSetDatabase(None)

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 985, in OnSetDatabase

     self._showError(_("Path '%s' doesn't exist.") % gisdbase)

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 511, in _showError

     self.lmessage.SetLabel(_("Error: {text}").format(text=text))

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in
position 48: ordinal not in range(128)

OnInit returned false, exiting...

ERROR: Error in GUI startup. See messages above (if any) and if necessary,
please report this error to the GRASS developers.

On systems with package manager, make sure you have the right GUI package,
probably named grass-gui, installed.

To run GRASS GIS in text mode use the -text flag.

Use '--help' for further options

      grass74 --help

See also: https://grass.osgeo.org/grass74/manuals/helptext.html

Exiting...

MacBook-Pro-de-Gabriela-2:~ Gabriela$

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by marisn):

Replying to [comment:5 cgarzon]:
> The folders name was changed from Biología to biologia and Los Andes to
losandes with no spaces. We installed a previous version of GRASS 7.2.2
and there is still an error:
>
> /Applications/GRASS-7.2.2.app/Contents/MacOS/Grass.sh
> MacBook-Pro-de-Gabriela-2:~ Gabriela$
/Applications/GRASS-7.2.2.app/Contents/MacOS/Grass.sh
> Rebuilding Addon HTML manual pages index...
> Rebuilding Addon menu...
> Traceback (most recent call last):
> File "/Applications/GRASS-7.2.2.app/Contents/Resources/bin/grass72",
line 54, in <module>
> ENCODING = locale.getdefaultlocale()[1]
> File
"/Applications/GRASS-7.2.2.app/Contents/Resources/lib/python2.7/locale.py",
line 545, in getdefaultlocale
> return _parse_localename(localename)
> File
"/Applications/GRASS-7.2.2.app/Contents/Resources/lib/python2.7/locale.py",
line 477, in _parse_localename
> raise ValueError, 'unknown locale: %s' % localename
> ValueError: unknown locale: UTF-8

This error comes from Python (https://bugs.python.org/issue18378). Fix
your locale settings and it will be gone. Append following lines to your
~/.bash_profile:

{{{
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by neteler):

Replying to [comment:7 marisn]:
> Replying to [comment:5 cgarzon]:
> This error comes from Python (https://bugs.python.org/issue18378). Fix
your locale settings and it will be gone. Append following lines to your
~/.bash_profile:
>
> {{{
> export LC_ALL=en_US.UTF-8
> export LANG=en_US.UTF-8
> }}}

cgarzon: does this work for you?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cmbarton):

This bug is reported for Python 3.x. So I wonder if it is or is not a
problem for Python 2.7.

The binaries I've posted are all made with 2.7. I do not have LC_ALL or
LANG set in my .profile and do not have this problem, even though my
system is set to English. Some years ago, colleagues encounter problems
with systems set to Spanish or other languages. I do not know if this is
still an issue or not.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:9&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cgarzon):

We edited ~/.bash_profile and ~/.profile, and uninstalled phyton 3.6. Now
GRASS is using python 2.7 and the error persists. We ran locale and the
settings are changed:

android-db3310249737a4f2:~ Gabriela$ locale

LANG="en_US.UTF-8"

LC_COLLATE="en_US.UTF-8"

LC_CTYPE="en_US.UTF-8"

LC_MESSAGES="en_US.UTF-8"

LC_MONETARY="en_US.UTF-8"

LC_NUMERIC="en_US.UTF-8"

LC_TIME="en_US.UTF-8"

LC_ALL="en_US.UTF-8"

We had to open a new mac user account and on this account GRASS GIS has
the same error but does open. The text we are getting is the following:

  /usr/bin/env -i HOME=/Users/Gabriela
PATH=/usr/bin:/bin:/usr/sbin:/etc:/usr/lib
/Applications/GRASS-7.4.1.app/Contents/MacOS/Grass.sh

android-db3310249737a4f2:~ Gabriela$ /usr/bin/env -i HOME=/Users/Gabriela
PATH=/usr/bin:/bin:/usr/sbin:/etc:/usr/lib
/Applications/GRASS-7.4.1.app/Contents/MacOS/Grass.sh

Rebuilding Addon HTML manual pages index...

Rebuilding Addon menu...

Default locale not found, using UTF-8

WARNING: Default locale settings are missing. GRASS running with C locale.

Cleaning up temporary files...

access: No such file or directory

ERROR: LOCALIZACIÓN </Users/Gabriela/Documents/Los

        Andes/Biología/grassdata/nc_spm_08_grass7> no disponible

Starting GRASS GIS...

Traceback (most recent call last):

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 1236, in OnInit

     StartUp = GRASSStartup()

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 233, in __init__

     self._set_properties(grassVersion, grassRevisionStr)

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 286, in _set_properties

     self.OnSetDatabase(None)

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 985, in OnSetDatabase

     self._showError(_("Path '%s' doesn't exist.") % gisdbase)

   File
"/Applications/GRASS-7.4.1.app/Contents/Resources/gui/wxpython/gis_set.py",
line 511, in _showError

     self.lmessage.SetLabel(_("Error: {text}").format(text=text))

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in
position 48: ordinal not in range(128)

OnInit returned false, exiting...

ERROR: Error in GUI startup. See messages above (if any) and if necessary,
please report this error to the GRASS developers.

On systems with package manager, make sure you have the right GUI package,
probably named grass-gui, installed.

To run GRASS GIS in text mode use the -text flag.

Use '--help' for further options

      grass74 --help

See also: https://grass.osgeo.org/grass74/manuals/helptext.html

Exiting...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:10&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cmbarton):

Could you please give us the source of your Mac binary and when you got
it?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:11&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cmbarton):

Also, what language is your Mac system set to?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:12&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cgarzon):

The source of the Mac binary is:

http://grassmac.wikidot.com/downloads GRASS 7.4.1 stable. And we installed
it approx. 3 weeks ago.

The language in the Mac system is:

MacBook-Pro-de-Gabriela-2:~ Gabriela$ defaults read -g AppleLanguages
(
     "es-CO",
     "en-US"

)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:13&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: Startup | Version: 7.4.0
Resolution: | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------

Comment (by cmbarton):

Thanks. It is a recent download from my site then. Should work. BUT...

Check System Preferences (under apple menu) and then the Language & Region
settings. If it is not set to English, set it to English and see if this
fixes the problem.

IIRC, somehow the GUI code does not read the Unix type language setting
for the Mac or it reads it incorrectly. Then there is some kind of weird
conflict between the Mac Preferences and the type of settings you might
put in a .profile statement.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:14&gt;
GRASS GIS <https://grass.osgeo.org>

#3656: cannot launch GRASS GIS 7.4.1 gis_set error
--------------------------+-----------------------------------
  Reporter: cgarzon | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.4.5
Component: Startup | Version: 7.4.0
Resolution: fixed | Keywords: gis_set error, python
       CPU: Unspecified | Platform: MacOSX
--------------------------+-----------------------------------
Changes (by wenzeslaus):

* status: new => closed
* resolution: => fixed

Comment:

After transition to Python 3 when a lot of encoding issues was fixed, I'm
assuming this issue fixed. If you have problems, please open a new issue
on [https://github.com/OSGeo/grass/issues GitHub].

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3656#comment:18&gt;
GRASS GIS <https://grass.osgeo.org>