[GRASS-dev] Working with TGIS without starting GRASS explicitly
Blumentrath, Stefan
Stefan.Blumentrath at nina.no
Wed Sep 21 13:38:34 PDT 2016
Hei Laurent,
Not sure about python, but in bash you have to add this:
#For the temporal modules
export TGISDB_DRIVER=sqlite
export TGISDB_DATABASE=$MYGISDBASE/$MYLOC/PERMANENT/tgis/sqlite.db
to your script in order to make TGIS work when using GRASS modules withot starting GRASS explicitly...
See: https://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Bash_examples_.28GNU.2FLinux.29
Cheers
Stefan
-----Original Message-----
From: grass-dev [mailto:grass-dev-bounces at lists.osgeo.org] On Behalf Of Laurent C.
Sent: 21. september 2016 20:37
To: GRASS developers list <grass-dev at lists.osgeo.org>
Subject: [GRASS-dev] Working with TGIS without starting GRASS explicitly
Hello all,
I'm trying to adapt a python module in order for it to be run outside of GRASS.
I followed the instructions from the wiki and lib/python/script/setup.py
gsetup.init() run without error and I can list maps like in the example.
However, when I try to import the temporal module, I receive this error:
import grass.temporal as tgis
File "/usr/lib/grass70/etc/python/grass/temporal/__init__.py", line 1, in <module>
from core import *
File "/usr/lib/grass70/etc/python/grass/temporal/core.py", line 38, in <module>
from c_libraries_interface import *
File "/usr/lib/grass70/etc/python/grass/temporal/c_libraries_interface.py",
line 19, in <module>
import grass.lib.gis as libgis
File "/usr/lib/grass70/etc/python/grass/lib/gis.py", line 23, in <module>
_libs["grass_gis.7.0.4"] = load_library("grass_gis.7.0.4")
File "/usr/lib/grass70/etc/python/grass/lib/ctypes_loader.py", line 55, in load_library
return self.load(path)
File "/usr/lib/grass70/etc/python/grass/lib/ctypes_loader.py", line 71, in load
raise ImportError,e
ImportError: libgrass_datetime.7.0.4.so: cannot open shared object
file: No such file or directory
Did I forgot to set-up something or this is a bug?
Cheers,
Laurent
_______________________________________________
grass-dev mailing list
grass-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
More information about the grass-dev
mailing list