Opened 6 years ago
Closed 4 years ago
#3656 closed defect (fixed)
cannot launch GRASS GIS 7.4.1 gis_set error
Reported by: | cgarzon | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.4.5 |
Component: | Startup | Version: | 7.4.0 |
Keywords: | gis_set error, python | Cc: | |
CPU: | Unspecified | Platform: | MacOSX |
Description (last modified by )
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.
Change History (18)
comment:1 by , 6 years ago
Component: | Default → Startup |
---|---|
Description: | modified (diff) |
Keywords: | python added |
Milestone: | → 7.4.2 |
comment:2 by , 6 years ago
follow-up: 4 comment:3 by , 6 years ago
Yes, it does. It is
/Users/Gabriela/Documents/Los Andes/Biología/grassdata/nc_spm_08_grass7
it shouldn't have?
Thanks!
comment:4 by , 6 years ago
Replying to 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
follow-up: 7 comment:5 by , 6 years ago
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
comment:6 by , 6 years ago
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$
follow-up: 8 comment:7 by , 6 years ago
Replying to 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
comment:8 by , 6 years ago
Replying to marisn:
Replying to 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?
comment:9 by , 6 years ago
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.
comment:10 by , 6 years ago
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...
comment:11 by , 6 years ago
Could you please give us the source of your Mac binary and when you got it?
comment:13 by , 6 years ago
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"
)
comment:14 by , 6 years ago
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.
comment:18 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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 GitHub.
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!).