[GRASS-dev] svn: 41275 (Identation error in core.py?)

Pietro Zambelli peter.zamb at gmail.com
Thu Mar 4 03:24:19 EST 2010


In data mercoledì 3 marzo 2010 21:05:31, hai scritto:
> On Wed, Mar 3, 2010 at 12:58 PM, Pietro Zambelli <peter.zamb at gmail.com> wrote:
> > Hi all!
> > 
> > I try to compile grass7 from svn I reach this error:
> > 
> > GRASS GIS compilation log
> > -------------------------
> > Started compilation: Wed Mar  3 12:34:18 CET 2010
> > --
> > Errors in:
> > /home/pietro/builds/grass70/src/grass70/lib/python
> > /home/pietro/builds/grass70/src/grass70/scripts/d.vect.thematic
> > /home/pietro/builds/grass70/src/grass70/scripts/r.in.srtm
> > /home/pietro/builds/grass70/src/grass70/scripts/v.db.update
> > --
> > In case of errors please change into the directory with error and run
> > 'make'. If you get multiple errors, you need to deal with them in the
> > order they appear in the error log. If you get an error building a
> > library, you will also get errors from anything which uses the library.
> > --
> > 
> > then I try to run 'make':
> > --
> > $ cd src/grass70/lib/python/
> > python $ make
> > python -m py_compile /home/pietro/builds/grass70/src/grass70/dist.x86_64-
> > unknown-linux-gnu/etc/python/grass/script/core.py
> > Sorry: IndentationError: ('expected an indented block',
> > ('/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-
> > gnu/etc/python/grass/script/core.py', 71, 10, '    return val\n'))make:
> > *** [/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-
> > gnu/etc/python/grass/script/core.pyc] Error 1
> 
> I have tried with today's SVN - no such problem.
> 
> [neteler at north python]$ touch core.py
> [neteler at north python]$ make
> /usr/bin/install -c  -m 644 core.py
> /home/neteler/grass70/dist.x86_64-unknown-linux-gnu/etc/python/grass/script
> /core.py python -m py_compile
> /home/neteler/grass70/dist.x86_64-unknown-linux-gnu/etc/python/grass/script
> /core.py [neteler at north python]$
> 
> Perhaps you have local modifications? Which python version do you use?

I use Python 2.6.4

I have removed lib/python directory and update and now I have this different compilation error:

GRASS GIS compilation log
-------------------------
Started compilation: Thu Mar  4 08:59:03 CET 2010
--
Errors in:
/home/pietro/builds/grass70/src/grass70/scripts/v.colors
--
In case of errors please change into the directory with error and run 'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Thu Mar  4 08:59:46 CET 2010
make: *** [default] Error 1
==> ERROR: Build Failed.
    Aborting...

I try to remove and update but I still have this error

$ cd scripts/v.colors
$ make
/bin/install -c  v.colors.py /home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.colors
if [ "/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.colors" != "" ] ; then 
GISRC=/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc70 
GISBASE=/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu 
PATH="/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/bin:$PATH" 
PYTHONPATH="/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/etc/python:$PYTHONPATH" 
LD_LIBRARY_PATH="/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-
gnu/bin:/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-
gnu/lib:/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/lib:" LC_ALL=C 
/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.colors --html-description < 
/dev/null | grep -v '</body>\|</html>' > v.colors.tmp.html ; fi
  File "/home/pietro/builds/grass70/src/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.colors", line 247
    grass.run_command('r.colors', map = tmp_colr, flags = flip_flag, **color_cmd, quiet = True)
                                                                                ^
SyntaxError: invalid syntax
make: *** [v.colors.tmp.html] Error 1
rm v.colors.tmp.html

Thank you Markus and Glynn for your replies!

Pietro


More information about the grass-dev mailing list