[GRASS-dev] [GRASS GIS] #1711: Plot settings in profiler now broken

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
The plotting settings in the wxGUI profiler have been recently broken in
GRASS 6.4 svn. When I try to access them (using the NC demo data), I get
the following error:

{{{
Settings: unable to get value 'profile:raster:None'
Traceback (most recent call last):
   File "/Applications/GRASS/GRASS-6.4.3.app/Contents/MacOS/e
tc/wxpython/wxplot/base.py", line 489, in PlotOptions

title = _('Plot settings'))
   File "/Applications/GRASS/GRASS-6.4.3.app/Contents/MacOS/e
tc/wxpython/wxplot/dialogs.py", line 455, in __init__

wx.Dialog.__init__(self, parent, id, title, style = style,
**kwargs)
   File "/Applications/GRASS/GRASS-6.4.3.app/Contents/MacOS/e
tc/python/wx/_windows.py", line 651, in __init__

_windows_.Dialog_swiginit(self,_windows_.new_Dialog(*args,
**kwargs))
TypeError
:
'plottype' is an invalid keyword argument for this function

}}}

This is on a version compiled 23 August

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

The problem is that when you fix this error, another appears which is
probably caused by the major gui backport half a year ago. I am not sure
how the wxplot tools are tested in grass 7 but I think now it would be
easier to copy all wxplot from 7 to 6.4 (no idea what is in 6.5). In
general it is quite difficult to maintain two different versions of gui
since classes in wxGUI are connected together (which is a sign of not well
designed class model).

Anna

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

I echo these difficulties.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Everything works fine with GRASS 7.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

I spoke too soon. You can open the settings in GRASS 7 and some of them
work. But hitting apply or save raises the following error:

{{{
Traceback (most recent call last):
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/gui/wxpython/wxplot/dialogs.py"
, line 1231, in OnApply

self.parent.SetGraphStyle()
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/gui/wxpython/wxplot/base.py",
line 299, in SetGraphStyle

self.client.SetEnableGrid(self.properties['grid']['enabled']
)
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/python/wx/lib/plot.py", line
895, in SetEnableGrid

self.Redraw()
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/python/wx/lib/plot.py", line
1264, in Redraw

self._Draw(graphics,xAxis,yAxis,dc)
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/python/wx/lib/plot.py", line
1258, in _Draw

self._adjustScrollbars()
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/python/wx/lib/plot.py", line
1855, in _adjustScrollbars

r_max = list(self._getYMaxRange())
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/python/wx/lib/plot.py", line
1067, in _getYMaxRange

yAxis = self._axisInterval(self._ySpec, p1[1], p2[1])
   File "/Users/Shared/grass_dev/grass70_dev/macosx/dist/GRAS
S-7.0.app/Contents/MacOS/etc/python/wx/lib/plot.py", line
1665, in _axisInterval

raise ValueError, str(spec) + ': illegal axis specification'
ValueError
:
{'max': 0.0, 'type': u'auto', 'log': False, 'min': 0.0}:
illegal axis specification
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

I can't reproduce this error. However I can see some inconsistency in the
settings - when you change value (color, text) of certain widgets the
change is automatically applied on the graph. But this doesn't work for
all widgets. When the dialog has Apply button, these changes should apply
only after clicking on the button and not earlier.
After pressing Save you get this output in console: Plot settings saved to
file 'None'.
The settings file is changed but I cannot see the changed values.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Not sure how much it is related to this ticket, but r53039 fixed the
settings for the profile tool. Successfully tested under XP, profile tool
is back working.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

OK, maybe not related. This error remains:

Map display -> Profile Icon -> Settings -> Plot Settings:
{{{
Traceback (most recent call last):
   File "C:\Programmi\GRASS GIS
6.4.3svn\etc\wxpython\wxplot\base.py", line 472, in
PlotOptions

title = _('Plot settings'))
   File "C:\Programmi\GRASS GIS
6.4.3svn\etc\wxpython\wxplot\dialogs.py", line 495, in
__init__

self._do_layout()
   File "C:\Programmi\GRASS GIS
6.4.3svn\etc\wxpython\wxplot\dialogs.py", line 568, in
_do_layout

size = (120, -1), choices = self.linestyledict.keys(), style
= wx.CB_DROPDOWN)
   File "C:\Programmi\GRASS GIS 6.4.3svn\Python27\lib\site-
packages\wx-2.8-msw-unicode\wx\_controls.py", line 494, in
__init__

_controls_.Choice_swiginit(self,_controls_.new_Choice(*args,
**kwargs))
wx._core
.
PyAssertionError
:
C++ assertion "!(style & wxCB_DROPDOWN) && !(style &
wxCB_READONLY) && !(style & wxCB_SIMPLE)" failed at
..\..\src\msw\choice.cpp(121) in wxChoice::Create(): this
style flag is ignored by wxChoice, you probably want to use
a wxComboBox

}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Markus,

This seems like a Windows-specific problem. Can you tell me a bit more
specifically what things do and do not work so I can check on it?

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

On XP, the bug is triggered when starting the profiler tool and going to
settings:

Map display -> Profile Icon -> Settings -> Plot Settings

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

OK. I'm pretty sure I fixed this. CB_DROPDOWN is not a valid style for
wx.Choice, but for wxComboBox. I guess nix and Mac don't care, but Windows
does. There was a mix of mostly wx.Choice controls and a couple
wx.ComboBox controls on the options dialog. I made them all wx.Choice for
consistency and got rid of the invalid style.

Please test r5348.

PS: is there any way to add a cc on a ticket? There used to be I thought
but I can't find it now. I'd like to cc Anna.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

That should be r53048

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Replying to [comment:11 cmbarton]:
> That should be r53048

Yes, it fixes the problem to open the plot settings dialog. Unfortunately
one more now
when changing settings therein and clicking Apply/OK:
{{{
Traceback (most recent call last):
   File "C:\Programmi\GRASS GIS
6.4.3svn\etc\wxpython\wxplot\dialogs.py", line 867, in OnOk

self.OnApply(None)
   File "C:\Programmi\GRASS GIS
6.4.3svn\etc\wxpython\wxplot\dialogs.py", line 860, in
OnApply

self.UpdateSettings()
   File "C:\Programmi\GRASS GIS
6.4.3svn\etc\wxpython\wxplot\dialogs.py", line 837, in
UpdateSettings

self.properties['marker']['type'] =
self.FindWindowById(self.wxId['marker']['type']).GetValue()
AttributeError
:
'Choice' object has no attribute 'GetValue'
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

OK. Back now and will check on this. Thanks for testing.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Try r53049

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

added tooltips as per Anna's suggestion and tweaked labels in options in
r53049

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Also updated GRASS 7 with same fixes. I'll try to see how best to update
6.5.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:16&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

It looks like GRASS 5 devbranch (AKA 6.5) is enough like 6.4.3 to allow
backporting for the profile fixes. So I've done this. Please test. If all
is well, we can close this.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:17&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

I've tested on Mac for 6.4.3, 6.5, and 7. Work for me in all branches.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:18&gt;
GRASS GIS <http://grass.osgeo.org>

#1711: Plot settings in profiler now broken
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Works now in 6.4.svn also on XP and Linux, thanks!
I did not test 6.5 and 7.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1711#comment:19&gt;
GRASS GIS <http://grass.osgeo.org>