Opened 6 years ago

Last modified 5 years ago

#3596 new defect

d.rast.edit: aspect map editing broken with AttributeError: 'module' object has no attribute 'NamedColor'

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.4.5
Component: wxGUI Version: svn-releasebranch74
Keywords: d.rast.edit Cc:
CPU: Unspecified Platform: Unspecified

Description

At time no editing of an aspect map is possible:

GRASS 7.4.1svn (nc_spm_08_grass7): >

# create aspect map
r.slope.aspect elev=elev_lid792_1m asp=elev_lid792_1m_asp

# run editing of it
d.rast.edit input=elev_lid792_1m aspect=elev_lid792_1m_asp output=elev_lid792_1m_modified
...scripts/d.rast.edit:211: wxPyDeprecationWarning: Call to deprecated item. 
  self.SetVirtualSizeHints(50, 50)

Traceback (most recent call last):
  File "/home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/scripts/d.rast.edit", line 342, in OnPaint2
    self.paint_rect(dc, x, y, w, h)
  File "/home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/scripts/d.rast.edit", line 323, in paint_rect
    self.paint_cell(dc, r, c)
  File "/home/mneteler/software/grass74/dist.x86_64-pc-linux-gnu/scripts/d.rast.edit", line 304, in paint_cell
    r, g, b = wx.NamedColor(fill)
AttributeError: 'module' object has no attribute 'NamedColor'
...

In addition, when the aspect map does not exist, the error is not properly trapped in Python.

Change History (3)

comment:1 by neteler, 5 years ago

Milestone: 7.4.27.4.3

Ticket retargeted after milestone closed

comment:2 by martinl, 5 years ago

Milestone: 7.4.37.4.4

Bump milestone to 7.4.4

comment:3 by neteler, 5 years ago

Milestone: 7.4.47.4.5

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.