Opened 5 years ago

Closed 5 years ago

#3937 closed defect (fixed)

Histogram tool in the GUI: save button gives error

Reported by: veroandreo Owned by: grass-dev@…
Priority: normal Milestone: 7.8.2
Component: wxGUI Version: svn-trunk
Keywords: histogram Cc:
CPU: Unspecified Platform: Linux

Description

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.

Change History (8)

comment:1 by neteler, 5 years ago

Milestone: 7.8.2

This wxPyDeprecationWarning also shows up when simply plotting a histogram.

comment:2 by annakrat, 5 years ago

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.

comment:3 by neteler, 5 years ago

Excellent, the problem is fixed, thanks!

Last edited 5 years ago by neteler (previous) (diff)

comment:4 by veroandreo, 5 years ago

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

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...

comment:5 by annakrat, 5 years ago

That's a different issue, looking into this.

comment:6 by annakrat, 5 years ago

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

comment:7 by veroandreo, 5 years ago

works fine now :)

I leave open in case it needs backport

comment:8 by annakrat, 5 years ago

Resolution: fixed
Status: newclosed

Backported.

Note: See TracTickets for help on using tickets.