[GRASS-dev] [GRASS GIS] #3937: Histogram tool in the GUI: save button gives error

#3937: Histogram tool in the GUI: save button gives error
------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: wxGUI | Version: svn-trunk
Keywords: histogram | CPU: Unspecified
Platform: Linux |
------------------------+-------------------------
When I try to save the histogram generated by the histograming tool from
the GUI, I get the following:

{{{
/home/veroandreo/software/grass79-dev/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/wxlibplot.py:609:
wxPyDeprecationWarning: Using deprecated class. Use Cursor
instead.
   self.HandCursor = wx.CursorFromImage(Hand.GetImage())
/home/veroandreo/software/grass79-dev/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/wxlibplot.py:611:
wxPyDeprecationWarning: Using deprecated class. Use Cursor
instead.
   self.GrabHandCursor =
wx.CursorFromImage(GrabHand.GetImage())
/home/veroandreo/software/grass79-dev/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/wxlibplot.py:615:
wxPyDeprecationWarning: Using deprecated class. Use Cursor
instead.
   self.MagCursor = wx.CursorFromImage(MagPlus.GetImage())
Traceback (most recent call last):
   File
"/home/veroandreo/software/grass79-dev/dist.x86_64-pc-linux-
gnu/gui/wxpython/wxplot/base.py", line 483, in SaveToFile

self.client.SaveFile()
   File
"/home/veroandreo/software/grass79-dev/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/wxlibplot.py", line 733, in
SaveFile

fType = _string.lower(fileName[-3:])
AttributeError
:
module 'string' has no attribute 'lower'
}}}

and I can't save the plot.

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------
Changes (by neteler):

* milestone: => 7.8.2

Comment:

This wxPyDeprecationWarning also shows up when simply plotting a
histogram.

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------

Comment (by annakrat):

This should be fixed now in master. It might still give you a warning,
which is a problem in wx fixed in latest version. Please test, I plan to
backport it.

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------

Comment (by neteler):

Excellent, the original problem is fixed, thanks!

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------

Comment (by veroandreo):

I just updated and the original problem is gone, thanks :slight_smile:

I just observed a different (maybe related) issue. When I use "Create
histogram with d.histogram" from the GUI and try to save it, the output is
either not created and GUI crashes or, the dialog saying "please wait,
exporting image..." never disappears...

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------

Comment (by annakrat):

That's a different issue, looking into this.

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------

Comment (by annakrat):

This was little bit more tricky, but should be fixed in master, could you
please test?

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------

Comment (by veroandreo):

works fine now :slight_smile:

I leave open in case it needs backport

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

#3937: Histogram tool in the GUI: save button gives error
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.8.2
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: histogram
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------
Changes (by annakrat):

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

Comment:

Backported.

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