g.extension error installing install r.hazard.flood

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

g.extension error installing install r.hazard.flood

RichardCooper
Hi,

I'm getting the following error on using g.extension to install r.hazard.flood:
                                           
g.extension.py extension=r.hazard.flood svnurl=http://svn.osgeo.org/grass/grass-addons/grass6
Traceback (most recent call last):
  File "/usr/lib/grass64/etc/gui/scripts/g.extension.py",
line 827, in <module>
    sys.exit(main())
  File "/usr/lib/grass64/etc/gui/scripts/g.extension.py",
line 815, in main
    check_dirs()
  File "/usr/lib/grass64/etc/gui/scripts/g.extension.py",
line 760, in check_dirs
    check_style_files('grass_logo.png')
  File "/usr/lib/grass64/etc/gui/scripts/g.extension.py",
line 742, in check_style_files
    shutil.copyfile(dist_file,addons_file)
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory:
'/usr/lib/grass64/docs/html/grass_logo.png'


I've checked Nabble forum comments re installing extensions but cannot find a solution.

What would be the best method to install? Is there a manual way of installing an extension?

Cheers,
Richard

My system:
 6.4.3-1~svn548 (mint 13/ubuntu precise)

/usr/lib/grass64
/usr/lib/grass64/scripts
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

RichardCooper
This post was updated on .
I get the following error on attempting to install grass-dev into the system using the package manager:

E: /var/cache/apt/archives/grass-dev_6.4.3-1~svn54876~precise1_i386.deb: trying to overwrite '/usr/lib/grass64/include/Make/Rules.make', which is also in package grass 6.4.3-1~svn54876~precise1


On running g.extension it appears to be a permissions issue:

/bin/sh: 1: cannot create /usr/lib/grass64/locale/scriptstrings/r.hazard.flood.py_to_translate.c: Permission denied sed: couldn't flush stdout: Broken pipe
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

hamish-2
In reply to this post by RichardCooper
Richard wrote:
> I'm getting the following error on using g.extension to
> install r.hazard.flood:
>          
> g.extension.py extension=r.hazard.flood
> svnurl=http://svn.osgeo.org/grass/grass-addons/grass6
> Traceback (most recent call last):
>   File
> "/usr/lib/grass64/etc/gui/scripts/g.extension.py",
...
> IOError: [Errno 2] No such file or directory:
> '/usr/lib/grass64/docs/html/grass_logo.png'
>
> I've checked Nabble forum comments re installing extensions
> but cannot find a solution.

that file comes from the grass-doc package. is it installed?
(search for which package has the file: `dpkg -S grass_logo.png`
if installed; `apt-file search grass_logo.png` if not installed)


> What would be the best method to install? Is there a manual
> way of installing an extension?

at least three other ways, the first is try g.extension[.sh] from
the grass command line (it's a separate module from the python
version), the second is to just make a ~/bin directory and put
the script in there (may need to log out and back it to get
~/bin in your path automatically).
if you have all your personal scripts in a directory somewhere,
you can set and export the GRASS_ADDON_PATH to that pathname
before starting grass and the script will then be in the GRASS
path.
and finally, if you have the full grass source code installed
you can run `make MODULE_TOPDIR=/path/to/src/topdir`.


> My system:
>  6.4.3-1~svn548 (mint 13/ubuntu precise)
...
> I get the following error on attempting to install grass-dev
> into the system using the package manager:
>
> E: /var/cache/apt/archives/grass-
> dev_6.4.3-1~svn54876~precise1_i386.deb:
> trying to overwrite '/usr/lib/grass64/include/Make/Rules.make',
> which is also in package grass 6.4.3-1~svn54876~precise1

where did you get the packages from? UbuntuGIS? the solution when
working with after-market packages and having trouble is to
completely remove/purge the old from the system before trying to
install another version. (it's a moving target, apparently the
previous package was not sync'd to the new build rules from
DebianGIS, but the new one was, and the packager has not put
a Conflicts: in the debian/control file)


Hamish
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

RichardCooper
This post was updated on .
> where did you get the packages from? UbuntuGIS? the solution when
> working with after-market packages and having trouble is to
> completely remove/purge the old from the system before trying to
> install another version.

From the ubuntugis-testing repository, installed via Synaptic Package Manager:
http://ppa.launchpad.net/ubuntugis/ubuntugis-testing/ubuntu/dists/precise/main/binary-i386/Packages


> that file comes from the grass-doc package. is it installed?
> (search for which package has the file: `dpkg -S grass_logo.png`
$ dpkg -S grass_logo.png
grass: /usr/lib/grass64/docs/html/nviz/grass_logo.png
grass: /usr/lib/grass64/docs/html/grass_logo.png


Running g.extension from GRASS command line:
> g.extension extension=r.hazard.flood
...
/usr/bin/install: cannot stat `/home/rcooper/grassdata/Bangkok_UTM47/PERMANENT/.tmp/rcooper-notebook/9305.0/dist.i686/man/man1/r.hazard.flood.py.1': No such file or directory
make: *** [install] Error 1
ERROR: Installation failed, sorry. Please check above error messages.


GRASS 6.4.3 (Bangkok_UTM47):~ > echo $GRASS_ADDON_PATH
/home/rcooper/.grass6/addons:/home/rcooper/.grass6/addons/scripts


When I try to install another addon, with g.extension gui, the addon isn't added to the addons directory below:
g.extension.py extension=r.fuzzy.logic svnurl=http://svn.osgeo.org/grass/grass-addons/grass6
WARNING: GRASS_ADDON_PATH has more items, using first defined - '/home/rcooper/.grass6/addons'
Fetching <r.fuzzy.logic> from GRASS-Addons SVN (be patient)...
Compiling...
/usr/lib/grass64/include/Make/Module.make:25: warning:
overriding commands for target `install'
/usr/lib/grass64/include/Make/Rules.make:101: warning:
ignoring old commands for target `install'
mkdir: cannot create directory `/build': Permission denied
make: ***
[/build/buildd/grass-6.4.3/debian/tmp/usr/lib/grass64/bin]
Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
(Fri May 17 20:00:59 2013) Command finished (11 sec)  


When I try from the GRASS command line:
GRASS 6.4.3 (Bangkok_UTM47):~ > g.extension extension=r.fuzzy.logic
...
/usr/bin/install: cannot stat `/home/rcooper/grassdata/Bangkok_UTM47/PERMANENT/.tmp/rcooper-notebook/10100.0/dist.i686/man/man1/r.fuzzy.logic.1': No such file or directory
make: *** [install] Error 1
ERROR: Installation failed, sorry. Please check above error messages.
GRASS 6.4.3 (Bangkok_UTM47):~ >

Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

RichardCooper
This post was updated on .
A few comments/observations:

1. r.hazard.flood.py appears in addons directory (/home/user/.grass6/addons) after running the g.extension command from the GRASS terminal, but gives the following error:
GRASS 6.4.3 (Bangkok_UTM47):~ > g.extension extension=r.hazard.flood
...
/user-notebook/11269.0/dist.i686/docs/html/r.hazard.flood.py.html /home/user/.grass6/addons/docs/html/
/usr/bin/install -c  -m 644 /home/user/grassdata/Bangkok_UTM47/PERMANENT/.tmp/user-notebook/11269.0/dist.i686/man/man1/r.hazard.flood.py.1 /home/user/.grass6/addons/man/man1/
/usr/bin/install: cannot stat `/home/user/grassdata/Bangkok_UTM47/PERMANENT/.tmp/user-notebook/11269.0/dist.i686/man/man1/r.hazard.flood.py.1': No such file or directory
make: *** [install] Error 1
ERROR: Installation failed, sorry. Please check above error messages.

2. Trying to install r.fuzzy.logic from the GRASS terminal also appears to install (e.g., can see r.fuzzy.logic executable (in /home/user/.grass6/addons/bin) but errors are given:
GRASS 6.4.3 (Bangkok_UTM47):~ > g.extension extension=r.fuzzy.logic
...
/usr/bin/install -c  -m 644 /home/user/grassdata/Bangkok_UTM47/PERMANENT/.tmp/user-notebook/11402.0/dist.i686/man/man1/r.fuzzy.logic.1 /home/user/.grass6/addons/man/man1/
/usr/bin/install: cannot stat `/home/user/grassdata/Bangkok_UTM47/PERMANENT/.tmp/user-notebook/11402.0/dist.i686/man/man1/r.fuzzy.logic.1': No such file or directory
make: *** [install] Error 1
ERROR: Installation failed, sorry. Please check above error messages.

3. How would I run r.fuzzy.logic?
Output from the GRASS terminal:
GRASS 6.4.3 (Bangkok_UTM47):~ > r.fuzzy.logic
r.fuzzy.logic: command not found

Output from Layer Manager > Command console:
r.fuzzy.logic                                                                  
[Errno 2] No such file or directory


Cheers,
Richard



 
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

RichardCooper
This post was updated on .
I resolved running r.fuzzy.logic by setting the GRASS_ADDON_PATH

1. Set in terminal before starting GRASS;

$ GRASS_ADDON_PATH=/home/user/.grass6/addons/bin
export GRASS_ADDON_PATH

2. r.fuzzy.logic can now be run from the GRASS Layer Manager via the Command Console:
r.fuzzy.logic
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

Vishal Mehta-2
Hi all,

I'm also interested in using r.hazard.flood, but i'm using grass7 svn on Ubuntu 12.04LTS

I dont think this addon exists for grass 7?

thanks,
Vishal




On Fri, May 17, 2013 at 7:09 AM, RichardC <[hidden email]> wrote:
I resolved running r.fuzzy.logic by setting the GRASS_ADDON_PATH

1. Set in terminal before starting GRASS;

$ GRASS_ADDON_PATH=/home/rcooper/.grass6/addons/bin
export GRASS_ADDON_PATH

2. r.fuzzy.logic can now be run from the GRASS Layer Manager via the Command
Console:
r.fuzzy.logic




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/g-extension-error-installing-install-r-hazard-flood-tp5053923p5054013.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user



--
Vishal K. Mehta, PhD
Scientist
Stockholm Environment Institute - US
133 D St Suite F
Davis CA 95616
www.sei-us.org

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

hamish-2
In reply to this post by RichardCooper
Vishal wrote:
> I'm also interested in using r.hazard.flood, but i'm using
> grass7 svn on Ubuntu 12.04LTS
>
> I dont think this addon exists for grass 7?

no, but you can try to run it anyway, maybe it works already,
maybe it just needs a minor tweak or two. it's a python script
so editing it in place is easy.


Hamish
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

RichardCooper
In reply to this post by RichardCooper
Maybe I was too quick to say this was resolved.

I just can't seem to start r.fuzzy.logic

Before starting GRASS I set the GRASS_ADDON_PATH as follows:

$export =/home/user/.grass6/addons (also tried /home/user/.grass6/addons/bin)
export GRASS_ADDON_PATH
echo $GRASS_ADDON_PATH
/home/user/.grass6/addons/bin


This doesn't seem to be reflected in /home/user/.grass.bashrc   ?

After starting GRASS, running r.fuzzy.logic doesn't start the module form the Layer Manager

When I attempt to run from the  GRASS terminal by inserting the path to the executable I get the error:

Unable to fetch interface description for command 'r.fuzzy.logic'.

Details: [Errno 2] No such file or directory

Try to set up GRASS_ADDON_PATH variable

What am I not doing correctly with the GRASS_ADDON_PATH?

Richard
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

RichardCooper
This post was updated on .
Some observations that might help identify if my system is in error?

I've added the following to .grass.bashrc

GRASS_ADDON_PATH=/home/rcooper/.grass6/addons/bin
export GRASS_ADDON_PATH

However, I can only run the r.fuzzy.logic extension if I also set the GRASS_ADDON_PATH in a terminal and run grass from the same terminal (I cannot run the extension if starting GRASS from the menu)?

Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

hamish-2
> Some observations that might help
> identify if my system is in error?
>
> I've added the following to .grass.bashrc
>
> GRASS_ADDON_PATH=/home/rcooper/.grass6/addons/bin
> export GRASS_ADDON_PATH

that is fine, just to note that the bin/ and script/ dirs
were created there due to the crash of the extension manager
GUI, usually they are removed after install of the executable
to ~/.grass6/addons/. but it's all ok, if you manually set
GRASS_ADDON_PATH grass will respect whatever you choose to do.
it can also be multiple paths if you like, separated by ":".
 
> However, I can only run the r.fuzzy.logic extension if I
> also set the GRASS_ADDON_PATH in a terminal and run the run
> grass from the same terminal
> (I cannot run the extension if starting GRASS from the
> menu)?

GRASS_ADDON_PATH needs to be set before the grass startup script
runs, so the menu misses that, setting it in the terminal only
affects the terminal itself and things launched from it. I set
my GRASS_ADDON_PATH in ~/.bashrc so it's always available.


Hamish
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

hamish-2
In reply to this post by RichardCooper
Richard wrote:
> This doesn't seem to be reflected in
> /home/user/.grass.bashrc   ?

~/.grass.bashrc is only read by grass, e.g. I use it to reset
the GRASS> terminal prompt and GRASS_HTML_BROWSER to my
preferences. Unfortunately (in grass6 at least) GRASS_ADDON_PATH
doesn't work from there. Maybe you are thinking of $MAPSET/.bashrc
which grass does create.


> When I attempt to run from the  GRASS terminal by
> inserting the path to the executable I get the error:
>
> Unable to fetch interface description for command
> 'r.fuzzy.logic'.

that indicates the program is not in the $PATH, which it needs
to be for scripts. (the scripts run the g.parser module, which
then reruns the script by name, if it can't find the program you
get the above error)


Hamish
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

Markus Neteler
In reply to this post by Vishal Mehta-2
On Sat, May 18, 2013 at 12:22 AM, Vishal Mehta <[hidden email]> wrote:
> Hi all,
>
> I'm also interested in using r.hazard.flood, but i'm using grass7 svn on
> Ubuntu 12.04LTS
>
> I dont think this addon exists for grass 7?

Now it does, in r56295 I have made an attempt to update it to G7:
Try

g.extension r.hazard.flood

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: g.extension error installing install r.hazard.flood

Vishal Mehta-2
Thanks Markus,

r.hazard.flood does work now in G7 for me.

Now I'm trying to understand the results for my study area :) - please do let me know if there is any more information about this module or its application, than the grass webpage for it:

http://svn.osgeo.org/grass/grass-addons/grass6/raster/r.hazard.flood/description.html

FYI, i am trying to use grass modules for urban hydrology in general.

Best,
Vishal



On Sat, May 18, 2013 at 5:48 AM, Markus Neteler <[hidden email]> wrote:
On Sat, May 18, 2013 at 12:22 AM, Vishal Mehta <[hidden email]> wrote:
> Hi all,
>
> I'm also interested in using r.hazard.flood, but i'm using grass7 svn on
> Ubuntu 12.04LTS
>
> I dont think this addon exists for grass 7?

Now it does, in r56295 I have made an attempt to update it to G7:
Try

g.extension r.hazard.flood

Markus



--
Vishal K. Mehta, PhD
Scientist
Stockholm Environment Institute - US
133 D St Suite F
Davis CA 95616
www.sei-us.org

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user