Re: [GRASS-dev] GRASS 6 REALLY IS broken on Mac

2012-07-25 Thread Michael Barton
More tests.

If I delete .grassrc6 and start GRASS, it opens fine after asking for a 
GISDBASE location. But if I try to start it again, it errors out with the error 
below.

I suspect there is something wrong with a configuration file path. It has been 
changed and the new file is not being created

Michael

On Jul 25, 2012, at 2:03 PM, Michael Barton wrote:

 Something installed another Python version without my knowledge. Getting rid 
 of this solved the problem.
 
 Michael
 
 On Jul 25, 2012, at 1:22 PM, Michael Barton wrote:
 
 I'm recompiling GRASS binaries and found that GRASS 6 is broken on the Mac. 
 This is true for the current svn version I just updated and for the version 
 I compiled 28 June--both release branch and dev branch. I updated all 
 frameworks today, but I don't know if I tested the 28 June version of GRASS 
 6 after I compiled it. So I don't know if it is in the updated frameworks 
 (updated on 29 June) or in the GRASS code. GRASS 7 works fine. When I try to 
 launch GRASS 6, I get the following error after selecting a mapset and 
 clicking 'start grass'. 
 
 GRASS 6.4.3svn (Spearfish60_test):~  Traceback (most recent call last):
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, 
 line 139, in module
 sys.exit(main())
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, 
 line 132, in main
 app = GMApp(workspaceFile)
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, 
 line 45, in __init__
 wx.App.__init__(self, False)
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, 
 line 7981, in __init__
 self._BootstrapApp()
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, 
 line 7555, in _BootstrapApp
 return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, 
 line 78, in OnInit
 workspace = self.workspaceFile)
   File 
 /Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/lmgr/frame.py,
  line 108, in __init__
 self.notebook  = self._createNoteBook()
   File 
 /Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/lmgr/frame.py,
  line 257, in _createNoteBook
 self.goutput = GMConsole(self)
   File 
 /Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/gui_core/goutput.py,
  line 240, in __init__
 self.MakeSearchPaneContent(self.searchPane.GetPane())
   File 
 /Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/gui_core/goutput.py,
  line 356, in MakeSearchPaneContent
 self.search = SearchModuleWindow(parent = pane, cmdPrompt = 
 self.cmdPrompt)
   File 
 /Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/gui_core/ghelp.py,
  line 81, in __init__
 self.searchChoice.SetItems(self.cmdPrompt.GetCommandItems())
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, 
 line 11997, in SetItems
 self.AppendItems(items)
   File 
 /Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, 
 line 11859, in AppendItems
 return _core_.ItemContainer_AppendItems(*args, **kwargs)
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 100: 
 ordinal not in range(128)
 
 
 I have not changed my python or wxpython installation since the last time I 
 had a working GRASS 6 (earlier in June).
 
 Michael
 _
 C. Michael Barton
 Visiting Scientist, Integrated Science Program
 National Center for Atmospheric Research 
 University Corporation for Atmospheric Research
 303-497-2889 (voice)
 
 Director, Center for Social Dynamics  Complexity 
 Professor of Anthropology, School of Human Evolution  Social Change
 Arizona State University
 www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
 
 
 _
 C. Michael Barton
 Visiting Scientist, Integrated Science Program
 National Center for Atmospheric Research 
 University Corporation for Atmospheric Research
 303-497-2889 (voice)
 
 Director, Center for Social Dynamics  Complexity 
 Professor of Anthropology, School of Human Evolution  Social Change
 Arizona State University
 www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
 

_
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research 
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics  Complexity 
Professor of Anthropology, School of Human Evolution  Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] GRASS 6 REALLY IS broken on Mac

2012-07-25 Thread Michael Barton
I don't know if this is relevant, but it is weird. If you look at the error 
trace below, you'll see that the first group of lines references files in 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS. This is the GRASS app and is 
correct. But the second group (after the line feeds I added), references files 
in my source directory. Then the last group (again after a couple line feeds) 
references the app again. Somehow, GRASS is not finding the directories lmgr 
and gui_core in the app and somehow looking for them in the source. This may 
(or may not) the the cause of this error. 

Michael

Traceback (most recent call last):
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, line 
143, in module
sys.exit(main())
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, line 
136, in main
app = GMApp(workspaceFile)
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, line 
45, in __init__
wx.App.__init__(self, False)
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, line 
7981, in __init__
self._BootstrapApp()
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, line 
7555, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py, line 
82, in OnInit
workspace = self.workspaceFile)


  File 
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/lmgr/frame.py,
 line 108, in __init__
self.notebook  = self._createNoteBook()
  File 
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/lmgr/frame.py,
 line 257, in _createNoteBook
self.goutput = GMConsole(self)
  File 
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/gui_core/goutput.py,
 line 240, in __init__
self.MakeSearchPaneContent(self.searchPane.GetPane())
  File 
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-darwin10.8.0/etc/wxpython/gui_core/goutput.py,
 line 356, in MakeSearchPaneContent
self.search = SearchModuleWindow(parent = pane, cmdPrompt = self.cmdPrompt)


  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_core/ghelp.py,
 line 81, in __init__
self.searchChoice.SetItems(self.cmdPrompt.GetCommandItems())
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, line 
11997, in SetItems
self.AppendItems(items)
  File 
/Applications/GRASS/GRASS-6.4.app/Contents/MacOS/etc/python/wx/_core.py, line 
11859, in AppendItems
return _core_.ItemContainer_AppendItems(*args, **kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 100: 
ordinal not in range(128)


_
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research 
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics  Complexity 
Professor of Anthropology, School of Human Evolution  Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] GRASS 6 REALLY IS broken on Mac - bug identified

2012-07-25 Thread Michael Barton
I figured out how to fix this problem, but it is a bug in the program somewhere 
that it happens. 

The line

LANG: en_US.UTF-8

(or another LANG code) must be added manually to the .grassrc6 file.

Selecting this in preferences has no effect of saving it anywhere, but GRASS 6 
looks for this in the .grassrc6 file -- where it is not, unless you manually 
put it there. I've seen some discussion about new language settings go across 
the list but have not paid much attention. Perhaps something has changed making 
this setting necessary. However, it will break everyone's GRASS 6 installation 
(at least on the Mac) unless GRASS puts some kind of default into the .grassrc6 
file--where it is looking for it--and allows users to update their language 
setting in this file.

Note that I deleted the .grassrc6 file and let GRASS recreate it several times. 
It never added this now required language encoding line. In GRASS 7, this is 
put into the rc file inside the .grass7 directory. While GRASS 6 has a .grass6 
directory, it is only for the wx configuration file. The language setting from 
preferences goes into this wx file, but apparently needs to be a GRASS variable 
set in the .grassrc6 file (and GRASS 7 rc file) too.

This also explains a weird error I was getting yesterday installing GRASS onto 
a Spanish colleague's machine--which is set to Spanish language encoding. 

If this is a quick fix, it is needed ASAP. Otherwise, I can file an urgent bug 
report. Perhaps this is only a bug on the Mac, but it is rather serious.

Michael
_
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research 
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics  Complexity 
Professor of Anthropology, School of Human Evolution  Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] GRASS 6 REALLY IS broken on Mac - bug identified

2012-07-25 Thread Hamish
Michael wrote:
 However, it will break everyone's GRASS 6 installation (at least on the
 Mac) unless GRASS puts some kind of default into the .grassrc6
 file--where it is looking for it--

Hi,

I have no idea about the change that made this bug, but it should only add
to the .grassrc6 file on demand, not by default. Whatever is falling over
because that is not set should initially set itself to LANG: C internally
as the default, and be able to deal with older mapsets where it was not
set.

aka don't put some kind of default in there just as an easy fix, instead
fix whatever can't deal with the value being missing to safely cope with
that situation.

what version of 6.4? 6.4.3svn only? or is it in 6.4.2 too?

thanks,
Hamish
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] GRASS 6 REALLY IS broken on Mac - bug identified

2012-07-25 Thread Hamish

these two seem relevant:

https://trac.osgeo.org/grass/changeset/51822
https://trac.osgeo.org/grass/changeset/51831


but maybe there is another change which doesn't check for the 'lang = None'
case?


Hamish
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] GRASS 6 REALLY IS broken on Mac - bug identified

2012-07-25 Thread Michael Barton
The problem is that without the LANG= line, the GUI errors out and won't run. 
Previously, it did not require this line to run.

Michael

On Jul 25, 2012, at 4:46 PM, Hamish wrote:

 Michael wrote:
 However, it will break everyone's GRASS 6 installation (at least on the
 Mac) unless GRASS puts some kind of default into the .grassrc6
 file--where it is looking for it--
 
 Hi,
 
 I have no idea about the change that made this bug, but it should only add
 to the .grassrc6 file on demand, not by default. Whatever is falling over
 because that is not set should initially set itself to LANG: C internally
 as the default, and be able to deal with older mapsets where it was not
 set.
 
 aka don't put some kind of default in there just as an easy fix, instead
 fix whatever can't deal with the value being missing to safely cope with
 that situation.
 
 what version of 6.4? 6.4.3svn only? or is it in 6.4.2 too?
 
 thanks,
 Hamish

_
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research 
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics  Complexity 
Professor of Anthropology, School of Human Evolution  Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] GRASS 6 REALLY IS broken on Mac - bug identified

2012-07-25 Thread Michael Barton
Yes. Even though this is working on my computer it is not working correctly on 
my spanish colleague's computer. He is getting ERROR: unknown locale: UTF-8.

Then parts of the GUI don't work. Mainly, it will not open any of the 
autogenerated dialogs when called from the menus. These throw a error in 
GUI((parent = self).ParseCommand(cmd) and a raise gcmd.GException(e) in 
core.gcmd.

This is real squirrelly. This was all working smoothly a short while ago.

Michael





On Jul 25, 2012, at 8:19 PM, Hamish wrote:

 But GRASS does not create a .grassrc6 file with this line (LANG = None
 or anything else) by default.
 
 and so it shouldn't,
 
 And apparently, there is nothing internal that supplies this
 if it is missing. It seems like it is only the GUI that is killed.
 
 right, if something new in the GUI wants it, then that something new should
 be able to deal with the case that it isn't there sometimes, and only
 write out the language choice if chosen.
 
 
 best,
 Hamish

_
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research 
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics  Complexity 
Professor of Anthropology, School of Human Evolution  Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev