[GRASS-dev] OSGeo4W GRASS 7 startup error

Markus Neteler neteler at osgeo.org
Fri Feb 28 00:17:43 PST 2014


On Thu, Feb 27, 2014 at 7:24 PM, Martin Landa <landa.martin at gmail.com> wrote:
> Hi,
>
> 2014-02-27 18:19 GMT+01:00 Martin Landa <landa.martin at gmail.com>:
>>> we are currently trying to install G7/OSGeo4W on a CZ laptop in the
>>> office, but both 6.4.svn and 7.svn fail.
>>>   File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\mapdisp\frame.py",
>>> line 77, in MapFrame
>>>     page = None, Map = Map(), auimgr = None, name = 'MapWindow', **kwargs):
>>>   File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\core\render.py", li
>>> ne 400, in __init__
>>>     self.GetWindow()
>>>   File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython\core\render.py", li
>>> ne 495, in GetWindow
>>>     key, value = line.split(":", 1)
>>> ValueError: need more than 1 value to unpack
>>
>> strangely I cannot reproduce this bug on the server where these builds
>> are being created. There is Czech MS Windows 2008 Server. I will try
>> out also my laptop with Windows 8 CZ.
>
> tested also on MS Windows 7 CZ with fresh OSGeo4w installation
> (32bit), everything seems to work. Could you please try to modify
> `render.py` in your installation folder to print content of 'line'
> variable?

I did Python debugging in the end:
http://grasswiki.osgeo.org/wiki/GRASS_Debugging#Python_script_debugging

It turned out that the WIND file contained only
NULNULNUL...

        for line in windfile.readlines():
            import pdb; pdb.set_trace()
            line = line.strip()
            key, value = line.split(":", 1)
            self.wind[key.strip()] = value.strip()

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn> > c:\osgeo4w\apps\grass\grass-7.0.svn\etc\gui\wxpython\core\rende
r.py(495)GetWindow()
-> line = line.strip()
(Pdb) line
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
(Pdb)

No idea how that can happen.
g.region -d
solved it.

Dunno if the function should have a test for WIND-may-contain-junk?

Markus


More information about the grass-dev mailing list