Opened 11 years ago

Closed 10 years ago

#1837 closed defect (fixed)

d.rast.edit error when attempting to edit a raster

Reported by: MarcoSc Owned by: grass-dev@…
Priority: normal Milestone: 6.4.3
Component: wxGUI Version: 6.4.3 RCs
Keywords: d.rast.edit, tcltk, wingrass Cc:
CPU: x86-64 Platform: All

Description

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 ?

Change History (9)

in reply to:  description comment:1 by hellik, 11 years ago

Replying to 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

comment:2 by neteler, 11 years ago

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?

in reply to:  2 ; comment:3 by hellik, 11 years ago

Replying to 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)  

in reply to:  3 ; comment:4 by hellik, 11 years ago

Replying to hellik:

is there a GRASS7-wxGUI-equivalent?

yes it is.

in reply to:  4 comment:5 by hellik, 11 years ago

Replying to hellik:

Replying to 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

in reply to:  description comment:6 by lucadelu, 11 years ago

Replying to 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

comment:7 by hamish, 11 years ago

Component: DefaultwxGUI
Keywords: d.rast.edit tcltk wingrass added; raster grass removed
Milestone: 6.4.36.4.4

comment:8 by hamish, 11 years ago

Milestone: 6.4.46.4.3

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

in reply to:  8 comment:9 by neteler, 10 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.