Opened 6 years ago
Closed 6 years ago
#3621 closed defect (fixed)
Cannot create map frame in cartographic composer
Reported by: | cmbarton | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 7.4.2 |
Component: | wxGUI | Version: | unspecified |
Keywords: | map frame, cartographic composer | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description (last modified by )
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'
Change History (22)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:4 by , 6 years ago
Priority: | blocker → critical |
---|
@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.
comment:5 by , 6 years ago
If I get my proposal in early enough I’ll test today. Otherwise tomorrow. Thanks again
comment:6 by , 6 years ago
I just tested this in trunk and it works. Thanks much. Is this backported so we can close the ticket?
comment:9 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:10 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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
Also, you can load a psmap file but if you try to do anything with it, it will lock up the entire GUI to a point that you must completely quit GRASS to get out of it.
comment:13 by , 6 years ago
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'
comment:14 by , 6 years ago
A bit more info. These 2 issues (symbols for points and scale bar) affect the cartographic composer in trunk too.
comment:17 by , 6 years ago
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?
follow-up: 21 comment:20 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This is all working now. I ran across another bug in 7.4 only that kept the preview from working but managed to fix it (r73482). I am closing.
comment:21 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:22 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I did. This was only a problem in 7.4. I ended up using the code from 7.6 to fix 7.4 (message_ becomes just _ in line 388, ../gui/wxpython/psmap/frame.py)
(properly formatting error report)