Error launching wxGUI in 7.0.1 r65194

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error launching wxGUI in 7.0.1 r65194

Eric Patton
Hi,

I am using a fresh checkout of Grass 7.0.1 r65194, and it compiled with no errors
(error.log is empty).

Machine details:

uname -a Linux W5-DAR-EPATTON 3.13.0-24-generic #47-Ubuntu SMP Fri May 2
23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


Traceback (most recent call last):
File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 142, in <module> sys.exit(main())
File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 134, in main app = GMApp(workspaceFile)
File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 49, in __init__ wx.App.__init__(self, False)
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in __init__ self._BootstrapApp()
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 83, in OnInit workspace = self.workspaceFile)
File "/usr/local/grass-7.0.1svn/gui/wxpython/lmgr/frame.py", line 121, in __init__ self._moduleTreeBuilder = LayerManagerModuleTree()
File "/usr/local/grass-7.0.1svn/gui/wxpython/lmgr/menudata.py", line 62, in __init__ MenuTreeModelBuilder.__init__(self, filename, expandAddons=expandAddons)
File "/usr/local/grass-7.0.1svn/gui/wxpython/core/menutree.py", line 66, in __init__ expAddons(xmlTree)

File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 346, in expandAddons _expandRuntimeModules(root, loadMetadata=True)
File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 596, in _expandRuntimeModules desc, keywords = _loadMetadata(name)
File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 629, in _loadMetadata task = gtask.parse_interface(module)
File "/usr/local/grass-7.0.1svn/etc/python/grass/script/task.py", line 509, in parse_interface tree = etree.fromstring(get_interface_description(name))

File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML parser.feed(text)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 17, column 19

Any ideas on what is going wrong?

~ Eric.
_______________________________________________
grass-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error launching wxGUI in 7.0.1 r65194

wenzeslaus
On Wed, May 6, 2015 at 3:02 PM, Eric Patton <[hidden email]> wrote:

>
> Hi,
>
> I am using a fresh checkout of Grass 7.0.1 r65194, and it compiled with no errors
> (error.log is empty).
>
> Machine details:
>
> uname -a Linux W5-DAR-EPATTON 3.13.0-24-generic #47-Ubuntu SMP Fri May 2
> 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>
>
> Traceback (most recent call last):
> File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 142, in <module> sys.exit(main())
> File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 134, in main app = GMApp(workspaceFile)
> File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 49, in __init__ wx.App.__init__(self, False)
> File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in __init__ self._BootstrapApp()
> File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp return _core_.PyApp__BootstrapApp(*args, **kwargs)
> File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 83, in OnInit workspace = self.workspaceFile)
> File "/usr/local/grass-7.0.1svn/gui/wxpython/lmgr/frame.py", line 121, in __init__ self._moduleTreeBuilder = LayerManagerModuleTree()
> File "/usr/local/grass-7.0.1svn/gui/wxpython/lmgr/menudata.py", line 62, in __init__ MenuTreeModelBuilder.__init__(self, filename, expandAddons=expandAddons)
> File "/usr/local/grass-7.0.1svn/gui/wxpython/core/menutree.py", line 66, in __init__ expAddons(xmlTree)
>
> File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 346, in expandAddons _expandRuntimeModules(root, loadMetadata=True)
> File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 596, in _expandRuntimeModules desc, keywords = _loadMetadata(name)
> File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 629, in _loadMetadata task = gtask.parse_interface(module)
> File "/usr/local/grass-7.0.1svn/etc/python/grass/script/task.py", line 509, in parse_interface tree = etree.fromstring(get_interface_description(name))
>
> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML parser.feed(text)
> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v)
> File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 17, column 19
>
> Any ideas on what is going wrong?

Please do lsb_release -a.

Then check if there is something in ~/.grass7/toolboxes/. (There could be something in case you experimented with toolboxes.)

Also look back in the compilation output you will find there section where there are some compilations of gui/wxpython code to .pyc. Then there should be parts which are comping toolboxes. Compilation holds there for a while with line ending with something like module_items.xml. Checking this might be useful in case there is something which should be an error but it is not.

I don't have better idea now (I just checked release branch and it works for me).

Vaclav

> ~ Eric.
> _______________________________________________
> grass-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-dev


_______________________________________________
grass-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error launching wxGUI in 7.0.1 r65194

wenzeslaus


On Wed, May 6, 2015 at 4:02 PM, Vaclav Petras <[hidden email]> wrote:
>
> On Wed, May 6, 2015 at 3:02 PM, Eric Patton <[hidden email]> wrote:
> >
> > Hi,
> >
> > I am using a fresh checkout of Grass 7.0.1 r65194, and it compiled with no errors
> > (error.log is empty).

In r65199 I added additional checks during compilation. An invalid XML should show up in the output in case it occurs.

http://trac.osgeo.org/grass/changeset/65199

> > Machine details:
> >
> > uname -a Linux W5-DAR-EPATTON 3.13.0-24-generic #47-Ubuntu SMP Fri May 2
> > 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
> >
> >
> > Traceback (most recent call last):
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 142, in <module> sys.exit(main())
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 134, in main app = GMApp(workspaceFile)
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 49, in __init__ wx.App.__init__(self, False)
> > File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in __init__ self._BootstrapApp()
> > File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp return _core_.PyApp__BootstrapApp(*args, **kwargs)
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/wxgui.py", line 83, in OnInit workspace = self.workspaceFile)
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/lmgr/frame.py", line 121, in __init__ self._moduleTreeBuilder = LayerManagerModuleTree()
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/lmgr/menudata.py", line 62, in __init__ MenuTreeModelBuilder.__init__(self, filename, expandAddons=expandAddons)
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/core/menutree.py", line 66, in __init__ expAddons(xmlTree)
> >
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 346, in expandAddons _expandRuntimeModules(root, loadMetadata=True)
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 596, in _expandRuntimeModules desc, keywords = _loadMetadata(name)
> > File "/usr/local/grass-7.0.1svn/gui/wxpython/core/toolboxes.py", line 629, in _loadMetadata task = gtask.parse_interface(module)
> > File "/usr/local/grass-7.0.1svn/etc/python/grass/script/task.py", line 509, in parse_interface tree = etree.fromstring(get_interface_description(name))
> >
> > File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML parser.feed(text)
> > File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v)
> > File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 17, column 19

Now I see that the error goes from grass.script.task.parse_interface (when called to get XML descriptions of modules installed from addons). I'm not sure why it is getting invalid XML from get_interface_description which itself seems to handle error well (return code and OSError are handled). I added an additional check to parse_interface in r65200.

http://trac.osgeo.org/grass/changeset/65200

> > Any ideas on what is going wrong?

Now I think that some addon you have is not working properly. This might be caused just by switching between different version of GRASS GIS inside 7 series (e.g. release and build from source code).

If the fix is correct, now a message should appear in the command line during start instead of the traceback. It will say that it is caused by addons and you should rebuild the addons using g.extension.all -f but you should first try the fix before running the command (it would be great if you could in this way test the fix). Note the changes are only in trunk.

I hope this helps,
Vaclav

> Please do lsb_release -a.
>
> Then check if there is something in ~/.grass7/toolboxes/. (There could be something in case you experimented with toolboxes.)
>
> Also look back in the compilation output you will find there section where there are some compilations of gui/wxpython code to .pyc. Then there should be parts which are comping toolboxes. Compilation holds there for a while with line ending with something like module_items.xml. Checking this might be useful in case there is something which should be an error but it is not.
>
> I don't have better idea now (I just checked release branch and it works for me).
>
> Vaclav
>
> > ~ Eric.
> > _______________________________________________
> > grass-dev mailing list
> > [hidden email]
> > http://lists.osgeo.org/mailman/listinfo/grass-dev
>

_______________________________________________
grass-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error launching wxGUI in 7.0.1 r65194

Eric Patton
In reply to this post by wenzeslaus
Hello,

I updated my svn and rebuilt, again without errors, but launching the GUI
caused the same problem. Instead, I deleted the ~/.grass7 directory, and
rebuilt, and it seemed to solve the problem. I suspect you are right that it
was an issue caused by some addon that I had previously loaded.

~ Eric.

> Please do lsb_release -a.
>
> Then check if there is something in ~/.grass7/toolboxes/. (There could be
> something in case you experimented with toolboxes.)
>
> Also look back in the compilation output you will find there section where
> there are some compilations of gui/wxpython code to .pyc. Then there should
> be parts which are comping toolboxes. Compilation holds there for a while
> with line ending with something like module_items.xml. Checking this might
> be useful in case there is something which should be an error but it is not.
>
> I don't have better idea now (I just checked release branch and it works
> for me).
>
> Vaclav
_______________________________________________
grass-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-dev