[GRASS-dev] [GRASS GIS] #1837: d.rast.edit error when attempting to edit a raster

#1837: d.rast.edit error when attempting to edit a raster
--------------------------+-------------------------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.3 RCs
Keywords: raster grass | Platform: All
      Cpu: x86-64 |
--------------------------+-------------------------------------------------
I always get an error when I try to edit cell values in a raster with the
GrassGIS command „d.rast.edit“. The error under Windows XP/GrassGIS 6.4.3
says:

{{{
Exception in thread Thread-29:
Traceback (most recent call last):
   File "D:\OSGeo4W\apps\Python27\lib\threading.py", line
552, in __bootstrap_inner
     self.run()
   File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
re\gcmd.py", line 538, in run
     os.pathsep + env['PATH']
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
   File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\gu
i_core\forms.py", line 657, in OnRun

gcmd.Command(cmd)
   File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
re\gcmd.py", line 389, in __init__

_("Error: ") + self.__GetError()))
core.gcmd
.
GException
Exception in thread Thread-30:
Traceback (most recent call last):
   File "D:\OSGeo4W\apps\Python27\lib\threading.py", line
552, in __bootstrap_inner
     self.run()
   File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
re\gcmd.py", line 538, in run
     os.pathsep + env['PATH']
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
   File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\gu
i_core\forms.py", line 657, in OnRun

gcmd.Command(cmd)
   File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
re\gcmd.py", line 389, in __init__

_("Error: ") + self.__GetError()))
core.gcmd
.
GException
}}}

… and under openSUSE 11 SP2/ Grass GIS 6.4.2:

{{{
Traceback (most recent call last):
   File "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/menu
form.py", line 662, in OnRun

gcmd.Command(cmd)
   File
"/usr/local/grass-6.4.2/etc/wxpython/gui_modules/gcmd.py",
line 350, in __init__

_("Error: ") + self.__GetError()))
gui_modules.gcmd
.
GException
:
Execution failed: 'd.rast.edit --overwrite --verbose
input=DEM_m_float_polypoi@PERMANENT output=123456'
Details:
Error:
Traceback (most recent call last):
   File "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/menu
form.py", line 662, in OnRun

gcmd.Command(cmd)
   File
"/usr/local/grass-6.4.2/etc/wxpython/gui_modules/gcmd.py",
line 350, in __init__

_("Error: ") + self.__GetError()))
gui_modules.gcmd
.
GException
:
Execution failed: 'd.rast.edit --overwrite --verbose
input=DEM_m_float_polypoi@PERMANENT output=123456'
Details:
Error:
}}}

Does anyone have an idea about the reason why I'm getting this error
and/or how to avoid it ?

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

#1837: d.rast.edit error when attempting to edit a raster
--------------------------+-------------------------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.3 RCs
Keywords: raster grass | Platform: All
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by hellik):

Replying to [ticket:1837 MarcoSc]:
> I always get an error when I try to edit cell values in a raster with
the GrassGIS command „d.rast.edit“.
>[...]
>
> Does anyone have an idea about the reason why I'm getting this error
and/or how to avoid it ?

as the manual [1] says it is a Tcl/Tk-based module.

what I've tested:

- starting (win)grass with old Tcl/Tk-GUI, d.rast.edit works
- starting (win)grass with wxGUI, d.rast.edit doesn't work

maybe an invoking-Tcl/Tk-module-by-wxGUI-issue?

Helmut

[1] http://grass.osgeo.org/grass64/manuals/d.rast.edit.html

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

#1837: d.rast.edit error when attempting to edit a raster
--------------------------+-------------------------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.3 RCs
Keywords: raster grass | Platform: All
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by neteler):

Maybe we need to backport d.rast.edit.py from GRASS 7 for the case that it
is
called from wxGUI (so backport into the wxgui/ part only) and leave the
Tcl
version as is for command line usage?

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

#1837: d.rast.edit error when attempting to edit a raster
--------------------------+-------------------------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.3 RCs
Keywords: raster grass | Platform: All
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by hellik):

Replying to [comment:2 neteler]:
> Maybe we need to backport d.rast.edit.py from GRASS 7 for the case that
it is
> called from wxGUI (so backport into the wxgui/ part only) and leave the
Tcl
> version as is for command line usage?

is there a GRASS7-wxGUI-equivalent?

see http://grass.osgeo.org/grass70/manuals/d.rast.edit.html

starting d.rast.edit from the wxGUI

{{{
Traceback (most recent call last):
   File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython
\lmgr\frame.py", line 725, in OnMenuCmd

GUI(parent = self).ParseCommand(cmd)
   File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython
\gui_core\forms.py", line 2122, in ParseCommand

raise gcmd.GException(e.value)
core.gcmd
.
GException
:
Unable to fetch interface description for command
'd.rast.edit.py'.
Details: Unable to open script file: Invalid argument
}}}

testedt with

{{{
GRASS version: 7.0.svn
GRASS SVN Revision: 54261
GIS Library Revision: 52468 (2012-07-27)
GDAL/OGR: 1.9.2
PROJ.4: 4.8.0
GEOS: 3.3.5
SQLite: 3.7.10
Python: 2.7.2
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

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

#1837: d.rast.edit error when attempting to edit a raster
--------------------------+-------------------------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.3 RCs
Keywords: raster grass | Platform: All
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by hellik):

Replying to [comment:3 hellik]:
>
> is there a GRASS7-wxGUI-equivalent?

yes it is.

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

#1837: d.rast.edit error when attempting to edit a raster
--------------------------+-------------------------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.3 RCs
Keywords: raster grass | Platform: All
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by hellik):

Replying to [comment:4 hellik]:
> Replying to [comment:3 hellik]:
> >
> > is there a GRASS7-wxGUI-equivalent?
>
> yes it is.

and it's starting called within the wingrass7-(mswindows)-commandline, but
the new raster map seems not to be saved

{{{
GRASS 7.0.svn> d.rast.edit.py input=myelev output=myelev2 --verbose
WARNUNG: Rasterkarte <tmp.d.rast.edit> wurde nicht gefunden.
WARNUNG: <tmp.d.rast.edit> nothing removed
GRASS 7.0.svn>
}}}

it fails starting from the wxGUI

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

#1837: d.rast.edit error when attempting to edit a raster
--------------------------+-------------------------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.3 RCs
Keywords: raster grass | Platform: All
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by lucadelu):

Replying to [ticket:1837 MarcoSc]:
> I always get an error when I try to edit cell values in a raster with
the GrassGIS command „d.rast.edit“. The error under Windows XP/GrassGIS
6.4.3 says:
>
> {{{
> Exception in thread Thread-29:
> Traceback (most recent call last):
> File "D:\OSGeo4W\apps\Python27\lib\threading.py", line
> 552, in __bootstrap_inner
> self.run()
> File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
> re\gcmd.py", line 538, in run
> os.pathsep + env['PATH']
> TypeError: 'NoneType' object is not subscriptable
> Traceback (most recent call last):
> File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\gu
> i_core\forms.py", line 657, in OnRun
>
> gcmd.Command(cmd)
> File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
> re\gcmd.py", line 389, in __init__
>
> _("Error: ") + self.__GetError()))
> core.gcmd
> .
> GException
> Exception in thread Thread-30:
> Traceback (most recent call last):
> File "D:\OSGeo4W\apps\Python27\lib\threading.py", line
> 552, in __bootstrap_inner
> self.run()
> File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
> re\gcmd.py", line 538, in run
> os.pathsep + env['PATH']
> TypeError: 'NoneType' object is not subscriptable
> Traceback (most recent call last):
> File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\gu
> i_core\forms.py", line 657, in OnRun
>
> gcmd.Command(cmd)
> File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co
> re\gcmd.py", line 389, in __init__
>
> _("Error: ") + self.__GetError()))
> core.gcmd
> .
> GException
> }}}
>

we discover that on windows seems that env is empty

> … and under openSUSE 11 SP2/ Grass GIS 6.4.2:
>
>
> {{{
> Traceback (most recent call last):
> File "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/menu
> form.py", line 662, in OnRun
>
> gcmd.Command(cmd)
> File
> "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/gcmd.py",
> line 350, in __init__
>
> _("Error: ") + self.__GetError()))
> gui_modules.gcmd
> .
> GException
> :
> Execution failed: 'd.rast.edit --overwrite --verbose
> input=DEM_m_float_polypoi@PERMANENT output=123456'
> Details:
> Error:
> Traceback (most recent call last):
> File "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/menu
> form.py", line 662, in OnRun
>
> gcmd.Command(cmd)
> File
> "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/gcmd.py",
> line 350, in __init__
>
> _("Error: ") + self.__GetError()))
> gui_modules.gcmd
> .
> GException
> :
> Execution failed: 'd.rast.edit --overwrite --verbose
> input=DEM_m_float_polypoi@PERMANENT output=123456'
> Details:
> Error:
> }}}
>
> Does anyone have an idea about the reason why I'm getting this error
and/or how to avoid it ?

For me in Debian the last version of GRASS 6.4.3 is working

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

#1837: d.rast.edit error when attempting to edit a raster
------------------------------------------+---------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: wxGUI | Version: 6.4.3 RCs
Keywords: d.rast.edit, tcltk, wingrass | Platform: All
      Cpu: x86-64 |
------------------------------------------+---------------------------------
Changes (by hamish):

  * keywords: raster grass => d.rast.edit, tcltk, wingrass
  * component: Default => wxGUI
  * milestone: 6.4.3 => 6.4.4

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

#1837: d.rast.edit error when attempting to edit a raster
------------------------------------------+---------------------------------
Reporter: MarcoSc | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.3 RCs
Keywords: d.rast.edit, tcltk, wingrass | Platform: All
      Cpu: x86-64 |
------------------------------------------+---------------------------------
Changes (by hamish):

  * milestone: 6.4.4 => 6.4.3

Comment:

d.rast.edit from the wxGUI in WinGrass is believed now fixed in relbr64,
see #86.

I didn't test it from the osgeo4w installer though, maybe you could.

Hamish

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

#1837: d.rast.edit error when attempting to edit a raster
----------------------+-----------------------------------------------------
  Reporter: MarcoSc | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.3 RCs
Resolution: fixed | Keywords: d.rast.edit, tcltk, wingrass
  Platform: All | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by neteler):

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

Comment:

Replying to [comment:8 hamish]:
> d.rast.edit from the wxGUI in WinGrass is believed now fixed in relbr64,
see #86.

.. hence closing. It will be part of the upcoming 6.4.4 release.

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