[GRASS-SVN] r69519 - grass-addons/grass7/vector/v.in.pygbif
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 18 14:16:32 PDT 2016
Author: sbl
Date: 2016-09-18 14:16:32 -0700 (Sun, 18 Sep 2016)
New Revision: 69519
Modified:
grass-addons/grass7/vector/v.in.pygbif/v.in.pygbif.py
Log:
fix manual build and column order
Modified: grass-addons/grass7/vector/v.in.pygbif/v.in.pygbif.py
===================================================================
--- grass-addons/grass7/vector/v.in.pygbif/v.in.pygbif.py 2016-09-18 21:15:32 UTC (rev 69518)
+++ grass-addons/grass7/vector/v.in.pygbif/v.in.pygbif.py 2016-09-18 21:16:32 UTC (rev 69519)
@@ -188,16 +188,6 @@
grass.message("You must be in GRASS GIS to run this program.")
sys.exit(1)
-try:
- from pygbif import occurrences
- from pygbif import species
-except ImportError:
- grass.fatal(_("Cannot import pygbif (https://github.com/sckott/pygbif)"
- " library."
- " Please install it (pip install pygbif)"
- " or ensure that it is on path"
- " (use PYTHONPATH variable)."))
-
def set_output_encoding(encoding='utf-8'):
import sys
import codecs
@@ -215,6 +205,16 @@
def main():
+ try:
+ from pygbif import occurrences
+ from pygbif import species
+ except ImportError:
+ grass.fatal(_("Cannot import pygbif (https://github.com/sckott/pygbif)"
+ " library."
+ " Please install it (pip install pygbif)"
+ " or ensure that it is on path"
+ " (use PYTHONPATH variable)."))
+
# Parse input options
output = options['output']
mask = options['mask']
@@ -575,8 +575,8 @@
res.update({k: None})
new.write(point, attrs=(
+ u'{}'.format(s),
res['key'],
- u'{}'.format(s),
res['taxonRank'],
res['taxonKey'],
res['taxonID'],
More information about the grass-commit
mailing list