[GRASS-user] How to embed a grass script (for example v.db.addcol) into a Pythonscript on windows?

Sonja Jankowfsky sonja.jankowfsky at cemagref.fr
Thu Mar 4 03:42:37 EST 2010


I deleted all reference to the to the scripts directory in the PATH, but 
I still have the same problem:

'""' n'est pas reconnu en tant que commande interne ou externe, un 
programme ex‚cutable ou un fichier de commandes.

Now my environment variables are as follows:
GISBASE C:\GRASS-4-SVN
GISRC C:\Documents and Settings\jankowfsky\.grassrc6
LD_LIBRARY_PATH C:\GRASS-4-SVN\lib
PATH 
C:\GRASS-4-SVN\etc;C:\GRASS-4-SVN\etc\python;C:\GRASS-4-SVN\lib;C:\GRASS-4-SVN\bin;C:\GRASS-4-SVN\extralib;C:\Python26;
PYTHONLIB C:\Python26
PYTHONPATH 
C:\GRASS-4-SVN\etc;C:\GRASS-4-SVN\etc\python;C:\GRASS-4-SVN\lib;C:\GRASS-4-SVN\bin;C:\GRASS-4-SVN\extralib;C:\Python26;

I've checked and there is a v.db.addcol.bat file in the bin directory.
I get the same problem for v.db.renamecol. If I use the GRASS windows 
command line to call directly the GRASS function v.db.addcol it works fine.

Does anybody has another idea what could be the problem?
Thanks,
Sonja



Glynn Clements a écrit :
> Sonja Jankowfsky wrote:
>
>   
>> Thanks, but the data type doesn't change that's a shell script. I still 
>> have the same error message: (sorry, it's in french, but it says as much 
>> as v.db.addcol is not a executable program or a bat file).
>>
>> I tried as well os.system("v.db.addcol map=ditch columns='urban int'"), 
>> but it's the same.
>>     
>
> This can occur if PATH is incorrect. GRASS' "bin" directory should be
> in the path, the "scripts" directory shouldn't be. There should be a
> batch file named v.db.addcol.bat in the "bin" directory.
>
>   


-- 
Sonja Jankowfsky
UR Hydrologie-Hydraulique
Cemagref de Lyon
3 bis quai Chauveau CP 220
69336 Lyon Cedex 09
FRANCE
Tel : (+33)4 72 20 86 11 	 
Fax : (+33)4 78 47 78 75 



More information about the grass-user mailing list