Hello All
Regarding a message that Hamish sent me a last week ago, related with:
FWIW, I try to copy custom stuff into a dir outside the install
dir which is pointed to by the GRASS_ADDON_PATH environment
variable, that way I can replace & upgrade grass versions
without accidentally deleting all my custom scripts.
see the “variables” help page.
I have added the following
export GRASS_ADDON_PATH=/usr/local/myproject
in grass64 (file located in /usr/local/bin)
When I run my function (i.ndvi) in Command line, in WXPYTHON GUI, instead of opening my function module, with all tabs, bla bla, an error window appears stating:
Execution failed: ‘i.ndvi’
Details:
Error:
And in command output Are printed errors regarding that required data for this script was not inserted
RROR: Required parameter not set:
(raster input map (Near Infrared)).
ERROR: Required parameter not set:
(raster input map (Red)).
ERROR: Required parameter not set:
(raster output NDVI map).
Do I haRROR: Required parameter not set:
(raster input map (Near Infrared)).
ERROR: Required parameter not set:
(raster input map (Red)).
ERROR: Required parameter not set:
(raster output NDVI map).
is it possible to run scripts, by using Module window, that are located in a external folder?
It seems like g.parser is not recognizing MODULE parameters
Thank you
Kim (in a typical latin lunch break
)
On Wed, 3 Feb 2010, Franz Schiller wrote:
Hello All
Regarding a message that Hamish sent me a last week ago, related with:
FWIW, I try to copy custom stuff into a dir outside the install
dir which is pointed to by the GRASS_ADDON_PATH environment
variable, that way I can replace & upgrade grass versions
without accidentally deleting all my custom scripts.
see the "variables" help page.
I have added the following
export GRASS_ADDON_PATH=/usr/local/myproject
in grass64 (file located in /usr/local/bin)
Perhaps you have added it after the call to Init.sh? It needs to be set before Init.sh is run in order to be picked up.
Even easier though, would be to set it in your .profile file in your home directory (create it if it's not there) - then it will always be set whenever you start a new shell and there is no need to edit the GRASS startup script. If you upgrade to a newer version of GRASS you won't need to re-edit the startup script either. Or you could just specify it on the command-line before starting GRASS; something like:
paul@haptimap:~/gis$ GRASS_ADDON_PATH=/usr/local/myproject grass64
should also work.
Best regards
Paul
Perhaps you have added it after the call to Init.sh? It needs to be set before Init.sh is run in order to be picked up.
My grass64 is like this now:
trap “echo ‘User break!’ ; exit” 2 3 9 15
GRASS_ADDON_PATH=/usr/local/myproj
export GRASS_ADDON_PATH
Set the GISBASE variable
GISBASE=/usr/local/grass-6.4.0svn
export GISBASE
exec “$GISBASE/etc/Init.sh” “$@”
So it’s defined before Init.sh.
If I do echo "$GRASS_ADDON_PATH it appears in GRASS so it’s parsed inside grass.
Regarding your suggestion:
sudo GRASS_ADDON_PATH=/usr/local/myproject grass64 -wxpython
I got the same result. An Error Window and the same command-output error.
Again, I think this might be an error associated with g.parse since he recognize that the script exists but he is not building Form and he is runned automatically when I insert its name in the command line
Regarding your .profile suggestion, what is necessary to be in that .profile file? and where should it be?
Franz
Even easier though, would be to set it in your .profile file in your home directory (create it if it’s not there) - then it will always be set whenever you start a new shell and there is no need to edit the GRASS startup script. If you upgrade to a newer version of GRASS you won’t need to re-edit the startup script either. Or you could just specify it on the command-line before starting GRASS; something like:
paul@haptimap:~/gis$ GRASS_ADDON_PATH=/usr/local/myproject grass64
should also work.
Best regards
Paul