Opened 7 years ago

Last modified 5 years ago

#2791 new defect

GridModule error and modified SEARCH PATH

Reported by: annakrat Owned by: grass-dev@…
Priority: normal Milestone: 7.2.4
Component: PyGRASS Version: svn-trunk
Keywords: GridModule Cc:
CPU: All Platform: Linux


When using GridModule, I am getting error:

----> 1

/usr/lib/grass70/etc/python/grass/pygrass/modules/grid/ 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/ 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/ 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(
    143     dst.visible.extend(visible)

/usr/lib/grass70/etc/python/grass/pygrass/gis/ in __iter__(self)
    384     def __iter__(self):
--> 385         for mapset in
    386             yield mapset

/usr/lib/grass70/etc/python/grass/pygrass/gis/ in read(self)
    393                 return [l.strip() for l in lines]
    394         lns = ['PERMANENT', ]
--> 395         self.write(lns)
    396         return lns

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 annakrat, 7 years ago

I hopefully fixed the error in r66746 and backported in r66747. The modified SEARCH_PATH is still problem.

comment:2 by neteler, 7 years ago


Milestone renamed

comment:3 by neteler, 6 years ago


Ticket retargeted after milestone closed

comment:4 by martinl, 6 years ago


comment:5 by neteler, 6 years ago


Ticket retargeted after milestone closed

comment:6 by martinl, 5 years ago

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:7 by martinl, 5 years ago

Milestone: 7.2.4
Note: See TracTickets for help on using tickets.