[returning the conversation to the mailing list] On Tue, May 31, 2016 at 7:35 PM, alassane toure <[email protected]> wrote:
> I am having problem with the launch session... > > # launch session > rcfile = gscript.setup.init(gisbase, gisdb, location, mapset) > > See the system response below.. > > /Programs/grass/rshade$ /home/alassane/Programs/grass/rshade/testing.py > Traceback (most recent call last): > File "/home/alassane/Programs/grass/rshade/testing.py", line 70, in > <module> > rcfile = gscript.setup.init(gisbase, gisdb, location, mapset) > AttributeError: 'module' object has no attribute 'setup' > The example was wrong. The `__init__.py` of `script` does not `import setup`: https://trac.osgeo.org/grass/browser/grass/trunk/lib/python/script/__init__.py So, the import needs to be done explicitly: import grass.script.setup as gsetup rcfile = gsetup.init(gisbase, gisdb, location, mapset) The documentation fixed in: https://trac.osgeo.org/grass/changeset/68547 Please test. Vaclav
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
