[GRASS-dev] python raster_history function broken?

Luca Delucchi lucadeluge at gmail.com
Thu Oct 30 02:27:18 PDT 2014


Hi everybody,

The raster_history function on my computer is not working.

In [5]: raster.raster_history('elevation')
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-2ee82b501872> in <module>()
----> 1 raster.raster_history('elevation')

/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/raster.pyc
in raster_history(map)
     40     current_mapset = gisenv()['MAPSET']
     41     if find_file(name=map)['mapset'] == current_mapset:
---> 42         run_command('r.support', map=map, history=os.environ['CMDLINE'])
     43         return True
     44

/usr/lib/python2.7/UserDict.pyc in __getitem__(self, key)
     21         if hasattr(self.__class__, "__missing__"):
     22             return self.__class__.__missing__(self, key)
---> 23         raise KeyError(key)
     24     def __setitem__(self, key, item): self.data[key] = item
     25     def __delitem__(self, key): del self.data[key]


In [8]: 'CMDLINE' in os.environ.keys()
Out[8]: False

What should CMDLINE environment variable do?

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org


More information about the grass-dev mailing list