[GRASS-dev] [GRASS GIS] #3685: pygrass GridModule: ERROR: Unable to open element file <windows>

GRASS GIS trac at osgeo.org
Fri Oct 19 02:23:26 PDT 2018


#3685: pygrass GridModule: ERROR: Unable to open element file <windows>
-------------------------+-------------------------
 Reporter:  mlennert     |      Owner:  grass-dev@…
     Type:  defect       |     Status:  new
 Priority:  normal       |  Milestone:  7.6.0
Component:  PyGRASS      |    Version:  svn-trunk
 Keywords:  GridModule   |        CPU:  Unspecified
 Platform:  Unspecified  |
-------------------------+-------------------------
 I've been using a script with code resembling the attached python script
 for months (notably through the i.cutlines addon), without any error. It
 uses the GridModule class from pygrass to run i.zc on tiles of an input
 map (as i.zc reads everything into memory).

 I suddenly get the following errors, both with trunk and release76:


 {{{
 GRASS 7.7.svn (nc_spm_08):~ > ./grid_test.py
 Creating edge map
 ERROR: ERROR: ERROR: UnableUnableUnable  toto  openopen  elementelement
 filefile  to  open<windows> <windows>for  elementfor file

        <tmp.grid_test.py.498 at izc_000_002>
  <tmp.grid_test.py.498 at izc_000_003>
 <windows> for
        <tmp.grid_test.py.498 at izc_000_001>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_000_000>
 ERROR: ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_000_003>
 Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_000_001>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_000_000>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_000_002>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_001>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_002>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_000>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_003>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_001>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_002>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_000>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_001_003>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_002_000>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_002_001>
 ERROR: ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_002_003>
 Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_002_002>
 ERROR: ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_002_001>
 Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_002_000>
 ERROR: ERROR: UnableUnable  toto  openopen  elementelement  filefile
 <windows><windows>  forfor

 <tmp.grid_test.py.498 at izc_002_002><tmp.grid_test.py.498 at izc_002_003>

 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_003_001>
 ERROR: ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_003_000>
 Unable to open element file <windows> for
        ERROR: <tmp.grid_test.py.498 at izc_003_002>
 Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_003_003>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_003_001>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_003_003>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_003_000>
 ERROR: Unable to open element file <windows> for
        <tmp.grid_test.py.498 at izc_003_002>
 Traceback (most recent call last):
   File "./grid_test.py", line 33, in <module>
     grd.run()
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/modules/grid/grid.py", line 568, in run
     self.patch()
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/modules/grid/grid.py", line 609, in patch
     self.start_row, self.start_col, self.out_prefix)
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/modules/grid/patch.py", line 79, in
 rpatch_map
     rtype.open('r')
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/raster/__init__.py", line 210, in open
     raise OpenError(str_err)
 grass.exceptions.OpenError: The map does not exist, I can't open in 'r'
 mode
 }}}

 Does anyone have any idea what might be going wrong ? When I look into one
 of these izc_* directories, I see the following:


 {{{
 GRASS 7.6.svn (nc_spm_08):~ > ls -l GRASSDATA/nc_spm_08/izc_002_002/
 total 16
 -rw-r--r-- 1 mlennert mlennert  14 oct 19 11:20 CURGROUP
 -rw-r--r-- 1 mlennert mlennert 291 oct 19 11:20 SEARCH_PATH
 -rw-r--r-- 1 mlennert mlennert  81 oct 19 11:20 VAR
 -rw-r--r-- 1 mlennert mlennert 317 oct 19 11:20 WIND
 }}}

 Does anyone have any idea about what might be going on ? This keeps me
 from launching quite long-running processes, so it would be great if I
 could solve this rapidly. I have to admit I'm a bit lost even just trying
 to understand what might be wrong and how I should debug this. Any hints
 are more than welcome.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3685>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list