[GRASS-dev] [GRASS GIS] #3621: Cannot create map frame in cartographic composer

#3621: Cannot create map frame in cartographic composer
----------------------------------------------+-------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Keywords: map frame, cartographic composer | CPU: Unspecified
Platform: Unspecified |
----------------------------------------------+-------------------------
Because the button to save a display to an image file is also broken,
there is no way to export a map from GRASS. So I'm elevating both bug
reports to blockers. This is broken in at least v. 7.4.1 and up.

I can draw a dotted line rectangle but it does not create a map frame. So
nothing else works in the composer.

Here is the error:

Traceback (most recent call last):
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 1463, in MouseActions

self.OnLeftUp(event)
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 1611, in OnLeftUp

settings=self.instruction, rect=rectPaper)
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 772, in __init__

notebook=False)
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 846, in __init__

self._layout()
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 1122, in _layout

convertRGB(self.mapFrameDict['color']))
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/utils.py", line 181, in convertRGB

color = wx.Colour(*color)
TypeError
:
Colour(): arguments did not match any overloaded call:
   overload 1: too many arguments
   overload 2: argument 1 has unexpected type 'float'
   overload 3: argument 1 has unexpected type 'float'
   overload 4: argument 1 has unexpected type 'float'

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: blocker | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Old description:

Because the button to save a display to an image file is also broken,
there is no way to export a map from GRASS. So I'm elevating both bug
reports to blockers. This is broken in at least v. 7.4.1 and up.

I can draw a dotted line rectangle but it does not create a map frame. So
nothing else works in the composer.

Here is the error:

Traceback (most recent call last):
  File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 1463, in MouseActions

self.OnLeftUp(event)
  File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 1611, in OnLeftUp

settings=self.instruction, rect=rectPaper)
  File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 772, in __init__

notebook=False)
  File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 846, in __init__

self._layout()
  File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 1122, in _layout

convertRGB(self.mapFrameDict['color']))
  File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/utils.py", line 181, in convertRGB

color = wx.Colour(*color)
TypeError
:
Colour(): arguments did not match any overloaded call:
  overload 1: too many arguments
  overload 2: argument 1 has unexpected type 'float'
  overload 3: argument 1 has unexpected type 'float'
  overload 4: argument 1 has unexpected type 'float'

New description:

Because the button to save a display to an image file is also broken,
there is no way to export a map from GRASS. So I'm elevating both bug
reports to blockers. This is broken in at least v. 7.4.1 and up.

I can draw a dotted line rectangle but it does not create a map frame. So
nothing else works in the composer.

Here is the error:

{{{
Traceback (most recent call last):
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 1463, in MouseActions

self.OnLeftUp(event)
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 1611, in OnLeftUp

settings=self.instruction, rect=rectPaper)
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 772, in __init__

notebook=False)
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 846, in __init__

self._layout()
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 1122, in _layout

convertRGB(self.mapFrameDict['color']))
   File "/Applications/GRASS-7.5.app/Contents/Resources/gui/w
xpython/psmap/utils.py", line 181, in convertRGB

color = wx.Colour(*color)
TypeError
:
Colour(): arguments did not match any overloaded call:
   overload 1: too many arguments
   overload 2: argument 1 has unexpected type 'float'
   overload 3: argument 1 has unexpected type 'float'
   overload 4: argument 1 has unexpected type 'float'
}}}

--

Comment (by neteler):

(properly formatting error report)

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: blocker | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by annakrat):

In [changeset:"73404" 73404]:
{{{
#!CommitTicketReference repository="" revision="73404"
wxGUI: fix for wxPython 4, see #3621
}}}

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: blocker | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by annakrat):

Please test in trunk, I will then backport it.

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------
Changes (by martinl):

* priority: blocker => critical

Comment:

@Michael, can you test it please sooner that later? RC1 is planned in the
next days. BTW, priority blocker is disputable since it's related to one
wxGUI component and wxPython4. I took liberty to decrease priority to
avoid blocking release.

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

If I get my proposal in early enough I’ll test today. Otherwise tomorrow.
Thanks again

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

I just tested this in trunk and it works. Thanks much. Is this backported
so we can close the ticket?

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by annakrat):

In [changeset:"73418" 73418]:
{{{
#!CommitTicketReference repository="" revision="73418"
wxGUI: fix for wxPython 4, see #3621 (merge from trunk, r73404)
}}}

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by annakrat):

In [changeset:"73419" 73419]:
{{{
#!CommitTicketReference repository="" revision="73419"
wxGUI: fix for wxPython 4, see #3621 (merge from trunk, r73404)
}}}

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: fixed | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------
Changes (by martinl):

* status: new => closed
* resolution: => fixed

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------
Changes (by cmbarton):

* status: closed => reopened
* resolution: fixed =>

Comment:

We need to reopen this. I just did a checkout and compile of 7.6RB. The
rubber band part of the map frame now works to open the dialog where you
can pick a map to display. But when you click OK, it generates an error.

[[[

Traceback (most recent call last):
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 446, in OnOK

ok = self.OnApply(event)
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 791, in OnApply

self.parent.DialogDataChanged(id=self.id[0])
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 1120, in DialogDataChanged

bb=rectCanvas)
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 2194, in Draw

w, h, lh = dc.GetMultiLineTextExtent(text)
ValueError
:
need more than 2 values to unpack

]]]

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by annakrat):

Try 73434.

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

Thanks. I'll try to squeeze it in tomorrow. Otherwise, Friday.

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

The issue with setting the map frame is now fixed. I was able to give a
full test and ran into 2 other issues which I'll mention here. One is
already reported and a serious problem. The other is less so but makes the
cartographic composer unusable for most purposes. We can keep this open
for these cartographic composer issues or move them to another ticket
because they are different from the map frame per se.

Issue 1: Cannot select point symbols. This also affects the vector
display, which is very serious. Here is the error when you click on the
button to select a symbol.

{{{
Traceback (most recent call last):
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 3149, in OnSymbolSelection

currentSymbol=self.symbolName.GetLabel())
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/gui_core/dialogs.py", line 2067, in __init__

self._layout()
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/gui_core/dialogs.py", line 2073, in _layout

fgSizer = wx.FlexGridSizer(rows=2, vgap=5, hgap=5)
TypeError
:
FlexGridSizer(): arguments did not match any overloaded
call:
   overload 1: 'hgap' is not a valid keyword argument
   overload 2: 'hgap' is not a valid keyword argument
   overload 3: 'hgap' is not a valid keyword argument
   overload 4: 'hgap' is not a valid keyword argument
}}}

Issue 2. You cannot add a scale bar. All the other items can be added.
Just not a scale bar. Here is the error:

{{{
Traceback (most recent call last):
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/frame.py", line 686, in OnAddScalebar

dlg = ScalebarDialog(self, id=id, settings=self.instruction)
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 4776, in __init__

self.panel = self._scalebarPanel()
   File "/Applications/GRASS-7.6.app/Contents/Resources/gui/w
xpython/psmap/dialogs.py", line 4947, in _scalebarPanel

self.sbCombo = wx.combo.BitmapComboBox(panel,
style=wx.CB_READONLY)
AttributeError
:
'module' object has no attribute 'combo'

}}}

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

A bit more info. These 2 issues (symbols for points and scale bar) affect
the cartographic composer in trunk too.

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by annakrat):

Should be fixed now, also backported to 76 and 74.

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

I'll test on Monday. Thanks much.

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

Everything is fixed in trunk. But not in 7.4. I have not tried 7.6

I updated 7.4 release branch and tested. Am I looking in the right place?

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by annakrat):

I hope now it should work everywhere (r73479).

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

#3621: Cannot create map frame in cartographic composer
--------------------------+----------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: critical | Milestone: 7.4.2
Component: wxGUI | Version: unspecified
Resolution: | Keywords: map frame, cartographic composer
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------------------

Comment (by cmbarton):

Thanks for all the work on this. I’ll test tomorrow.

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