[GRASS-user] error with a python's script

Yvan Paillé yvan.paille at cemagref.fr
Mon Mar 8 06:04:28 EST 2010


I would like to integrate my commands in a Python script. I use Eclipse 
for development. Everything works fine in the GUI, but the same command, 
pasted to the command line, produces this:

import os
import grass.script as grass

env = grass.gisenv()
print env
r = grass.read_command("g.list", type='vect')
print r

# Ask user for his name and stores
input1 = 'uhe'

#Create a category to name each line
grass.run_command ("v.category", input=input1, output='category', 
layer='2', type='boundary', option='add')

Response : ATTENTION : La couche vectorielle <category> existe déjà et 
va être écrasé
ATTENTION : Table <category> linked to vector map <category> does not exist
DBMI-DBF driver error:

ATTENTION : Impossible d'ouvrir la base de données <Cat
             D:/work/grassdata/data/test_chaudanne/uhe2/dbf/> avec le driver
ATTENTION : Unable open database <Cat
             D:/work/grassdata/data/test_chaudanne/uhe2/dbf/> by driver
ATTENTION : Impossible de trouver la table <Table> liée à la couche
             vectorielle <category>
ATTENTION : Impossible de supprimer la couche vectorielle <category>

I have tried to use v.db.connect but it makes me the same error's message.

Thank's for any hints.


More information about the grass-user mailing list