[GRASS-user] wxpython fails to open existing grc
Adam Dershowitz
adershowitz at exponent.com
Tue Mar 4 15:54:36 EST 2008
Thanks. Yes, I created the files with the gis.m tck interface. So, I
am (OK...was) a confused user.
But that raises a few questions about the development of the wx
interface:
Is there a way to convert tcl grc files over to wx grc files?
Generally, it is important in my opinion to keep backward
compatibility in code. Otherwise, as the wx gui takes over, as I
believe is the longer term plan, then old files will no longer be
useable, which is not good.
Also, it seems to me that instead of a syntax errors, if the file
can't be interpreted as proper xml that the wx interface could display
an error that this is not a valid file. That would help cut down on
the confusion indicated above.
Thanks,
--Adam
On Mar 4, 2008, at 11:54 AM, Martin Landa wrote:
> Hi Adam,
>
> hm, I guess you created the grc file in gis.m. The format is
> completely different in wxPython GUI, see
>
> http://trac.osgeo.org/grass/ticket/77
>
> File extension must be changed otherwise users will be confused.
>
> Martin
>
>
> 2008/3/4, Adam Dershowitz <adershowitz at exponent.com>:
>> I just upgraded from 6.3 RC 4 to 6.3 RC5 (using William Kyngesburye's
>> binaries on a Mac).
>> Now when I open the wxpython gui, if I try to open an existing .grc
>> file it
>> doesn't open and I get the following errors:
>>
>>
>>
>> Traceback (most recent call last):
>> File
>> "/Applications/GRASS-6.3.app/Contents/MacOS/etc/wxpython/wxgui.py",
>> line 524, in OnWorkspaceOpen
>> self.LoadGrcXmlToLayerTree(filename)
>> File
>> "/Applications/GRASS-6.3.app/Contents/MacOS/etc/wxpython/wxgui.py",
>> line 569, in LoadGrcXmlToLayerTree
>> xml.sax.parseString(fileStream, grcXml)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/xml/sax/__init__.py",
>> line 49, in parseString
>> parser.parse(inpsrc)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/xml/sax/expatreader.py",
>> line 107, in parse
>> xmlreader.IncrementalParser.parse(self, source)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/xml/sax/xmlreader.py",
>> line 123, in parse
>> self.feed(buffer)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/xml/sax/expatreader.py",
>> line 211, in feed
>> self._err_handler.fatalError(exc)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/xml/sax/handler.py",
>> line 38, in fatalError
>> raise exception
>> xml.sax._exceptions.SAXParseException: <unknown>:1:0:
>> syntax error
>>
>>
>> This didn't happen with RC4 and doesn't happen with the RC5 when
>> using the
>> tcl GUI.
>>
>> --Adam
>>
>>
>>
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
>
>
> --
> Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/
> ~landa *
More information about the grass-user
mailing list