Opened 9 years ago
Last modified 7 years ago
#2791 new defect
GridModule error and modified SEARCH PATH
Reported by: | annakrat | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.4 |
Component: | PyGRASS | Version: | svn-trunk |
Keywords: | GridModule | Cc: | |
CPU: | All | Platform: | Linux |
Description
When using GridModule, I am getting error:
----> 1 grd.run() /usr/lib/grass70/etc/python/grass/pygrass/modules/grid/grid.py in run(self, patch, clean) 530 if self.debug: 531 for wrk in self.get_works(): --> 532 cmd_exe(wrk) 533 else: 534 pool = mltp.Pool(processes=self.processes) /usr/lib/grass70/etc/python/grass/pygrass/modules/grid/grid.py in cmd_exe(args) 344 """ 345 bbox, mapnames, gisrc_src, gisrc_dst, cmd, groups = args --> 346 src, dst = get_mapset(gisrc_src, gisrc_dst) 347 env = os.environ.copy() 348 env['GISRC'] = gisrc_dst /usr/lib/grass70/etc/python/grass/pygrass/modules/grid/grid.py in get_mapset(gisrc_src, gisrc_dst) 139 src = Mapset(msrc, lsrc, gsrc) 140 dst = Mapset(mdst, ldst, gdst) --> 141 visible = [m for m in src.visible] 142 visible.append(src.name) 143 dst.visible.extend(visible) /usr/lib/grass70/etc/python/grass/pygrass/gis/__init__.py in __iter__(self) 383 384 def __iter__(self): --> 385 for mapset in self.read(): 386 yield mapset 387 /usr/lib/grass70/etc/python/grass/pygrass/gis/__init__.py in read(self) 393 return [l.strip() for l in lines] 394 lns = ['PERMANENT', ] --> 395 self.write(lns) 396 return lns 397 AttributeError: 'VisibleMapset' object has no attribute 'write'
This happens probably when the SEARCH_PATH is not defined in the mapset.
Also, If I then set it and run successfully the process in parallel, the search path is changed, it includes all the mapsets in that location, which shouldn't happen.
Change History (7)
comment:1 by , 9 years ago
comment:4 by , 8 years ago
Milestone: | 7.2.1 → 7.2.2 |
---|
comment:7 by , 7 years ago
Milestone: | → 7.2.4 |
---|
Note:
See TracTickets
for help on using tickets.
I hopefully fixed the error in r66746 and backported in r66747. The modified SEARCH_PATH is still problem.