[GRASS-user] r.basin error

I’m trying to install r.basin addon and I’m getting the following error:
GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.2 sh /usr/local/grass-6.4.2/tools/g.html2man /root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/docs/html/r.basin.py.html /root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/man/man1/r.basin.py.1 1
/usr/local/grass-6.4.2/tools/g.html2man: /usr/local/grass-6.4.2/tools/g.html2man: is a directory
make[2]: *** [/root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/man/man1/r.basin.py.1] Error 126
make[2]: Leaving directory /root/test/scratch/.tmp/fmtslack64/26418.0/r.basin' make[1]: *** [mancmd] Error 2 make[1]: Leaving directory /root/test/scratch/.tmp/fmtslack64/26418.0/r.basin’
make: *** [/root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/scripts/r.basin.py] Error 2
ERROR: Compilation failed, sorry. Please check above error messages.

I’m running slackware 13.37 64 bit and python 2.5.6

Thanks

On Mon, Nov 12, 2012 at 7:01 PM, kapo coulibaly <kmcoulib@gmail.com> wrote:

I'm trying to install r.basin addon and I'm getting the following error:
GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.2 sh
/usr/local/grass-6.4.2/tools/g.html2man
/root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/docs/html/r.basin.py.html
/root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/man/man1/r.basin.py.1
1
/usr/local/grass-6.4.2/tools/g.html2man:
/usr/local/grass-6.4.2/tools/g.html2man: is a directory

This should not be a directory. Could you please check what's inside?

thanks
Markus

inside /usr/local/grass-6.4.2/tools/g.html2man there is a file called g.html2man. I moved it outside and deleted the folder with the same name. After that r.basin installed without error. But when I try to run it get:

GRASS 6.4.2 (test):/usr/local/grass-6.4.2/tools > r.basin
/root/.grass6/addons/r.basin:572: Warning: ‘with’ will become a reserved keyword in Python 2.6
File “/root/.grass6/addons/r.basin”, line 572
with open(prefix+‘_parameters.csv’, ‘w’) as f:
^
SyntaxError: invalid syntax

On Mon, Nov 12, 2012 at 2:43 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Mon, Nov 12, 2012 at 7:01 PM, kapo coulibaly <kmcoulib@gmail.com> wrote:

I’m trying to install r.basin addon and I’m getting the following error:
GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.2 sh
/usr/local/grass-6.4.2/tools/g.html2man
/root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/docs/html/r.basin.py.html
/root//test/scratch/.tmp/fmtslack64/26418.0/dist.x86_64-slackware-linux-gnu/man/man1/r.basin.py.1
1
/usr/local/grass-6.4.2/tools/g.html2man:
/usr/local/grass-6.4.2/tools/g.html2man: is a directory

This should not be a directory. Could you please check what’s inside?

thanks
Markus

Hi,

On Tue, Nov 13, 2012 at 6:17 AM, kapo coulibaly <kmcoulib@gmail.com> wrote:

inside /usr/local/grass-6.4.2/tools/g.html2man there is a file called g.html2man. I moved it outside and deleted the folder with the same name. After that r.basin installed without error. But when I try to run it get:

GRASS 6.4.2 (test):/usr/local/grass-6.4.2/tools > r.basin
/root/.grass6/addons/r.basin:572: Warning: ‘with’ will become a reserved keyword in Python 2.6
File “/root/.grass6/addons/r.basin”, line 572
with open(prefix+‘_parameters.csv’, ‘w’) as f:
^
SyntaxError: invalid syntax

This is due to Python 2.5.x, you need to upgrade to 2.6 in order to run r.basin.

Best regards,
m


Margherita DI LEO

Postdoctoral Researcher
European Commission - DG JRC
Forest Resources and Climate
I-21020 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu