[GRASS-dev] pygrass v.import_() strange error
Nikos Alexandris
nik at nikosalexandris.net
Wed Jul 25 02:12:20 PDT 2018
* Yann Chemin <dr.yann.chemin at gmail.com> [2018-07-25 09:34:32 +0200]:
>Hi,
>(script below)
>I get this error
>
>v.import_(input=adminfile,output="admin",quiet=True,superquiet=True)
> File "/usr/lib/grass74/etc/python/grass/pygrass/modules/shortcuts.py",
>line 47, in __getattr__
> return self.cls('%s.%s' % (self.prefix, name.replace('_', '.')))
> File
>"/usr/lib/grass74/etc/python/grass/pygrass/modules/interface/module.py",
>line 530, in __init__
> raise GrassError(str_err % self.name)
>grass.exceptions.GrassError: Error running: `v.import.
>--interface-description`.
>
>#SCRIPT
>from grass_session import Session
>from grass.pygrass.modules.shortcuts import vector as v
>adminfile=gadm_FR_2_Morbihan.gpkg
>with Session(gisdb="/tmp", location="loc", create_opts="EPSG:4326"):
> v.import_(input=adminfile,output="admin",quiet=True,superquiet=True)
Yann,
does the "typical"
grass.run_command('v.import', input=adminfile, output="admin", quiet=True, superquiet=True)
work?
Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180725/20af760c/attachment.sig>
More information about the grass-dev
mailing list