[GRASS-dev] problem using pygrass
Javier Martínez-López
javi.martinez.lopez at gmail.com
Wed Mar 5 02:33:21 PST 2014
... something is wrong with my installation... I cannot even open any
map from the NC dataset using build 59147, getting the following error
after interrupting the idle process [1], while doing it with version
57982 works fine... any idea or advice? Here is the built
configuration that was used for the 59147 version:
./configure --prefix=/usr/local/grass-7.0.2 --with-libs=/usr/lib64
--with-cxx --without-ffmpeg --with-gdal=/usr/bin/gdal-config
--with-geos=/usr/bin/geos-config --without-odbc --with-sqlite
--without-postgres --without-mysql --with-nls --with-python
--with-cairo --with-wxwidgets=/usr/bin/wx-config --without-fftw
--with-freetype --with-freetype-includes=/usr/include/freetype2
--enable-largefile --with-pthread --with-lapack
... and the one from version 57982:
./configure --prefix=/usr/local --with-libs=/usr/lib64 --with-cxx
--without-ffmpeg --with-gdal=/usr/bin/gdal-config
--with-geos=/usr/bin/geos-config --without-odbc --with-sqlite
--without-postgres --without-mysql --with-nls --with-python
--with-cairo --with-wxwidgets=/usr/bin/wx-config --without-fftw
--with-freetype --with-freetype-includes=/usr/include/freetype2
--enable-largefile --with-pthread
the only difference is "--with-lapack" in the upper one...is there
something wrong with it?
Thank you and cheers,
Javier
[1]
>>> import os
>>> import numpy as np
>>> import grass.pygrass as pygrass
>>> lu = pygrass.raster.RasterNumpy('landuse')
>>> lu.shape
(474, 526)
>>> lu.open('r')
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/grass-7.0.2/grass-7.0.svn/etc/python/grass/pygrass/raster/__init__.py",
line 634, in open
self._read()
File "/usr/local/grass-7.0.2/grass-7.0.svn/etc/python/grass/pygrass/raster/__init__.py",
line 597, in _read
self[i] = rst.get_row(i, buff)
File "/usr/local/grass-7.0.2/grass-7.0.svn/etc/python/grass/pygrass/raster/__init__.py",
line 531, in __array_finalize__
self.filename = grasscore.tempfile()
File "/usr/local/grass-7.0.2/grass-7.0.svn/etc/python/grass/script/core.py",
line 680, in tempfile
return read_command("g.tempfile", flags=flags, pid=os.getpid()).strip()
File "/usr/local/grass-7.0.2/grass-7.0.svn/etc/python/grass/script/core.py",
line 412, in read_command
return ps.communicate()[0]
File "/home/majavie/anaconda/lib/python2.7/subprocess.py", line 790,
in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/home/majavie/anaconda/lib/python2.7/subprocess.py", line 476,
in _eintr_retry_call
return func(*args)
KeyboardInterrupt
On Tue, Mar 4, 2014 at 7:52 PM, Pietro <peter.zamb at gmail.com> wrote:
> Hi Javier,
>
> On Tue, Mar 4, 2014 at 5:26 PM, Javier Martínez-López
> <javi.martinez.lopez at gmail.com> wrote:
>> Thank you Pietro! I will try again! However, there seems to be a bug
>> (at least in version 59147) since I am getting NaN values reading some
>> maps with RasterNumpy, which are perfectly fine when reading them
>> using grass70 version 57982... They are FCELL! Did you also notice
>> that?
>
> Please check that the region is set correctly... all the cells are
> Nan? check with:
>
> np.nanmax(raster)
>
> Are you able to reproduce the problem with the North Carolina dataset?
> If yes please send me the procedure... and I will try to fix it.
>
> All the best
>
> Pietro
More information about the grass-dev
mailing list