Discussion:
[GRASSGUI] wx start error
William Kyngesburye
2007-11-14 22:56:52 UTC
Permalink
An error trying to start wxgrass. With 'wxgrass&' from a running
GRASS session, I get this error. Interestingly, if I set
my .grassrc6 to wx, I get the same error after a gis_set.py error,
but GRASS automatically starts in the last mapset I was in (as is set
in .grassrc6), instead of bailing completely (since gis_set.py failed).

The gis_set.py error appears only if I have DEBUG set to GUI:3 (it
doesn't like the : there). I get the normal mapset selection in
python if DEBUG is not set or is set to just a number.


startup error:

GUI D3/3: Map.GetRegion(): {'rows': 1431.0, 'e': 609000.0, 'cells':
2721762.0, 'cols': 1902.0, 'n': 4928010.0, 's': 4913700.0, 'w':
589980.0, 'ewres': 10.0, 'nsres': 10.0}
GUI D3/3: Map.__adjustRegion(): {'rows': 300, 'e': 609000.0, 'cells':
2721762.0, 'cols': 400, 'n': 4933535.0, 's': 4908175.0, 'w':
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
GUI D1/1: MapFrame.__init__(): size=640,480
GUI D3/3: Map.__adjustRegion(): {'rows': 300, 'e': 609000.0, 'cells':
2721762.0, 'cols': 400, 'n': 4933535.0, 's': 4908175.0, 'w':
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
GUI D3/3: Map.GetRegion(): {'rows': 1431.0, 'e': 609000.0, 'cells':
2721762.0, 'cols': 1902.0, 'n': 4928010.0, 's': 4913700.0, 'w':
589980.0, 'ewres': 10.0, 'nsres': 10.0}
GUI D2/2: Map.AddOverlay(): cmd=['d.barscale'], render=0
GUI D3/3: MapLayer.__init__(): type=overlay, cmd=d.barscale,
name=None, active=0, opacity=1, hidden=0
GUI D2/2: Map.AddOverlay(): cmd=['d.barscale'], render=0
GUI D3/3: MapLayer.__init__(): type=overlay, cmd=d.barscale,
name=None, active=0, opacity=1, hidden=0
GUI D3/3: Map.GetRegion(): {'rows': 1431.0, 'e': 609000.0, 'cells':
2721762.0, 'cols': 1902.0, 'n': 4928010.0, 's': 4913700.0, 'w':
589980.0, 'ewres': 10.0, 'nsres': 10.0}
GUI D3/3: Map.__adjustRegion(): {'rows': 300, 'e': 609000.0, 'cells':
2721762.0, 'cols': 400, 'n': 4933540.0, 's': 4908180.0, 'w':
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
GUI D3/3: Map.GetRegion(): {'rows': 1431.0, 'e': 609000.0, 'cells':
2721762.0, 'cols': 1902.0, 'n': 4928010.0, 's': 4913700.0, 'w':
589980.0, 'ewres': 10.0, 'nsres': 10.0}
GUI D3/3: Map.__adjustRegion(): {'rows': 300, 'e': 609000.0, 'cells':
2721762.0, 'cols': 400, 'n': 4933540.0, 's': 4908180.0, 'w':
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
GUI D3/3: Map.GetRegion(): {'rows': 1431.0, 'e': 609000.0, 'cells':
2721762.0, 'cols': 1902.0, 'n': 4928010.0, 's': 4913700.0, 'w':
589980.0, 'ewres': 10.0, 'nsres': 10.0}
GUI D3/3: BufferedWindow.OnSize():
GUI D3/3: BufferedWindow.OnSize():
GUI D3/3: Command.__init__(): [Popen] cmd=g.proj -p
GUI D3/3: Command(): cmd=g.proj -p, wait=1, returncode=0
GUI D3/3: AbstractDigit.__init__(): map=None
Traceback (most recent call last):
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 943, in <module>
app = GMApp(0)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7757,
in __init__
self._BootstrapApp()
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7354,
in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 925, in OnInit
mainframe = GMFrame(parent=None, id=wx.ID_ANY, title="")
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 188, in __init__
self.NewDisplay()
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 583, in NewDisplay
auimgr=self._auimgr)
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gui_modules/wxgui_utils.py", line 167, in __init__
self.shaded_icon = il.Add(trgif)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 5999, in
Add
return _gdi_.ImageList_Add(*args, **kwargs)
ValueError: invalid null reference in method 'ImageList_Add',
expected argument 2 of type 'wxBitmap const &'


gis_set.py error (when DEBUG = GUI:3):

Traceback (most recent call last):
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 497, in <module>
GRASSStartUp = StartUp(0)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7757,
in __init__
self._BootstrapApp()
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7354,
in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 488, in OnInit
StartUp = GRASSStartup(None, -1, "")
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 62, in __init__
self.grassrc = read_grassrc()
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 48, in read_grassrc
key,val = line.split(":")
ValueError: too many values to unpack
GRASS GUI should be wx


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy
Michael Barton
2007-11-14 22:56:52 UTC
Permalink
William,

This kind of looks like a problem specific to your system. Something is
wrong in your GRASS settings file. Maybe an invalid gis database, location,
or mapset. This is causing the startup to fail and default into the text
interface. Try running g.region -gp. I suspect it will give problematic
results.

Michael
Post by William Kyngesburye
An error trying to start wxgrass. With 'wxgrass&' from a running
GRASS session, I get this error. Interestingly, if I set
my .grassrc6 to wx, I get the same error after a gis_set.py error,
but GRASS automatically starts in the last mapset I was in (as is set
in .grassrc6), instead of bailing completely (since gis_set.py failed).
The gis_set.py error appears only if I have DEBUG set to GUI:3 (it
doesn't like the : there). I get the normal mapset selection in
python if DEBUG is not set or is set to just a number.
589980.0, 'ewres': 10.0, 'nsres': 10.0}
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
GUI D1/1: MapFrame.__init__(): size=640,480
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
589980.0, 'ewres': 10.0, 'nsres': 10.0}
GUI D2/2: Map.AddOverlay(): cmd=['d.barscale'], render=0
GUI D3/3: MapLayer.__init__(): type=overlay, cmd=d.barscale,
name=None, active=0, opacity=1, hidden=0
GUI D2/2: Map.AddOverlay(): cmd=['d.barscale'], render=0
GUI D3/3: MapLayer.__init__(): type=overlay, cmd=d.barscale,
name=None, active=0, opacity=1, hidden=0
589980.0, 'ewres': 10.0, 'nsres': 10.0}
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
589980.0, 'ewres': 10.0, 'nsres': 10.0}
589980.0, 'ewres': 63.399999999999999, 'nsres': 63.399999999999999}
589980.0, 'ewres': 10.0, 'nsres': 10.0}
GUI D3/3: Command.__init__(): [Popen] cmd=g.proj -p
GUI D3/3: Command(): cmd=g.proj -p, wait=1, returncode=0
GUI D3/3: AbstractDigit.__init__(): map=None
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 943, in <module>
app = GMApp(0)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7757,
in __init__
self._BootstrapApp()
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7354,
in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 925, in OnInit
mainframe = GMFrame(parent=None, id=wx.ID_ANY, title="")
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 188, in __init__
self.NewDisplay()
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
wxgui.py", line 583, in NewDisplay
auimgr=self._auimgr)
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gui_modules/wxgui_utils.py", line 167, in __init__
self.shaded_icon = il.Add(trgif)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 5999, in
Add
return _gdi_.ImageList_Add(*args, **kwargs)
ValueError: invalid null reference in method 'ImageList_Add',
expected argument 2 of type 'wxBitmap const &'
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 497, in <module>
GRASSStartUp = StartUp(0)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7757,
in __init__
self._BootstrapApp()
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7354,
in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 488, in OnInit
StartUp = GRASSStartup(None, -1, "")
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 62, in __init__
self.grassrc = read_grassrc()
File "/Applications/GRASS-6.3.app/Contents/Resources/etc/wx/
gis_set.py", line 48, in read_grassrc
key,val = line.split(":")
ValueError: too many values to unpack
GRASS GUI should be wx
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Earth: "Mostly harmless"
- revised entry in the HitchHiker's Guide to the Galaxy
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
William Kyngesburye
2007-11-14 22:56:52 UTC
Permalink
It's in the Spearfish mapset. g.region -gp works without problems.

The gis_set.py problem at least I can understand - the line:

key,val = line.split(":")

doesn't seem to work when there is more than one delimiter in the
string. Setting DEBUG=GUI:3 creates this in grassrc6:

DEBUG: GUI:3


For the bigger problem, after poking around,

[snipped what I was going to say before I updated from CVS]

It appears I have no "module-d.shadedmap.gif" in my gui icon set
(grass src/gui/icons). And, I just updated from CVS and there it is!
Post by Michael Barton
William,
This kind of looks like a problem specific to your system.
Something is
wrong in your GRASS settings file. Maybe an invalid gis database, location,
or mapset. This is causing the startup to fail and default into the text
interface. Try running g.region -gp. I suspect it will give
problematic
results.
Michael
Post by William Kyngesburye
An error trying to start wxgrass. With 'wxgrass&' from a running
GRASS session, I get this error. Interestingly, if I set
my .grassrc6 to wx, I get the same error after a gis_set.py error,
but GRASS automatically starts in the last mapset I was in (as is set
in .grassrc6), instead of bailing completely (since gis_set.py failed).
The gis_set.py error appears only if I have DEBUG set to GUI:3 (it
doesn't like the : there). I get the normal mapset selection in
python if DEBUG is not set or is set to just a number.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.
Michael Barton
2007-11-14 22:56:52 UTC
Permalink
William,

Thanks for troubleshooting.
Post by William Kyngesburye
It's in the Spearfish mapset. g.region -gp works without problems.
key,val = line.split(":")
doesn't seem to work when there is more than one delimiter in the
DEBUG: GUI:3
There needs to be a better way to set this that won't kill gis_set.py. I
think Martin worked out the debug routine.

Martin: any other way to specify debug? Maybe some way to specify the 1st
colon in the split. Have to look it up.
Post by William Kyngesburye
For the bigger problem, after poking around,
[snipped what I was going to say before I updated from CVS]
It appears I have no "module-d.shadedmap.gif" in my gui icon set
(grass src/gui/icons). And, I just updated from CVS and there it is!
I wish there was a way to trap a missing icon error. It it not easy to spot.


Michael
Post by William Kyngesburye
Post by Michael Barton
William,
This kind of looks like a problem specific to your system.
Something is
wrong in your GRASS settings file. Maybe an invalid gis database,
location,
or mapset. This is causing the startup to fail and default into the
text
interface. Try running g.region -gp. I suspect it will give
problematic
results.
Michael
Post by William Kyngesburye
An error trying to start wxgrass. With 'wxgrass&' from a running
GRASS session, I get this error. Interestingly, if I set
my .grassrc6 to wx, I get the same error after a gis_set.py error,
but GRASS automatically starts in the last mapset I was in (as is set
in .grassrc6), instead of bailing completely (since gis_set.py
failed).
The gis_set.py error appears only if I have DEBUG set to GUI:3 (it
doesn't like the : there). I get the normal mapset selection in
python if DEBUG is not set or is set to just a number.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
All generalizations are dangerous, even this one.
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Continue reading on narkive:
Loading...