rmartinshort / netcdf4-python

Automatically exported from code.google.com/p/netcdf4-python
Other
0 stars 0 forks source link

Module builds but won't pass all of the tests #219

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I installed per the read me
2. I ran the run_all tests
3.

What is the expected output? What do you see instead?
 python run_all.py 
.......E..EEE........./home/seidel/netCDF4-1.0.8/test/tst_endian.py:19: 
UserWarning: endian-ness of dtype and endian kwarg do not match, using endian 
kwarg
  bl = dataset.createVariable('big-little', '>f4', dims)
/home/seidel/netCDF4-1.0.8/test/tst_endian.py:20: UserWarning: endian-ness of 
dtype and endian kwarg do not match, using endian kwarg
  bb = dataset.createVariable('big-big', '>f4', dims)
..E.E.E.....E....E....E.E.
======================================================================
ERROR: test_1d (tst_slicing.VariablesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_slicing.py", line 86, in test_1d
    assert_equal(v1[d<5], d[d<5])
  File "netCDF4.pyx", line 2807, in netCDF4.Variable.__getitem__ (netCDF4.c:34394)
  File "/usr/lib64/python2.4/site-packages/netCDF4_utils.py", line 151, in _StartCountStride
    if any(el):
NameError: global name 'any' is not defined

======================================================================
ERROR: Test with a variable that has two unlimited dimensions.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_fancyslicing.py", line 58, in setUp
    v[ib2] = -200
  File "netCDF4.pyx", line 3059, in netCDF4.Variable.__setitem__ (netCDF4.c:37895)
  File "/usr/lib64/python2.4/site-packages/netCDF4_utils.py", line 151, in _StartCountStride
    if any(el):
NameError: global name 'any' is not defined

======================================================================
ERROR: testing 'fancy indexing'
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_fancyslicing.py", line 40, in setUp
    f = Dataset(file_name,'w')
  File "netCDF4.pyx", line 1424, in netCDF4.Dataset.__init__ (netCDF4.c:19478)
RuntimeError: Permission denied

======================================================================
ERROR: test_set (tst_fancyslicing.VariablesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_fancyslicing.py", line 40, in setUp
    f = Dataset(file_name,'w')
  File "netCDF4.pyx", line 1424, in netCDF4.Dataset.__init__ (netCDF4.c:19478)
RuntimeError: Permission denied

======================================================================
ERROR: testing auto-conversion of masked arrays and packed integers
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_masked2.py", line 43, in setUp
    v[3]=v.missing_value
  File "netCDF4.pyx", line 3096, in netCDF4.Variable.__setitem__ (netCDF4.c:38428)
  File "/usr/lib64/python2.4/site-packages/numpy/core/fromnumeric.py", line 1939, in around
    return round(decimals, out)
  File "/usr/lib64/python2.4/site-packages/numpy/ma/core.py", line 2855, in round
    result._mask = self._mask
AttributeError: 'numpy.float64' object has no attribute '_mask'

======================================================================
ERROR: test_1d (tst_utils.TestgetStartCountStride)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_utils.py", line 154, in test_1d
    start, count, stride, put_ind = nc._StartCountStride(elem, (5,))
  File "/usr/lib64/python2.4/site-packages/netCDF4_utils.py", line 151, in _StartCountStride
    if any(el):
NameError: global name 'any' is not defined

======================================================================
ERROR: test_boolean (tst_utils.TestgetStartCountStride)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_utils.py", line 94, in test_boolean
    start, count, stride, put_ind = nc._StartCountStride(elem, (50, 4,5))
  File "/usr/lib64/python2.4/site-packages/netCDF4_utils.py", line 151, in _StartCountStride
    if any(el):
NameError: global name 'any' is not defined

======================================================================
ERROR: test_booleans (tst_utils.TestsetStartCountStride)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_utils.py", line 221, in test_booleans
    start, count, stride, take_ind = nc._StartCountStride(elem, (10, 5, 12), ['x', 'y', 'z'], grp, (3, 3, 12))
  File "/usr/lib64/python2.4/site-packages/netCDF4_utils.py", line 151, in _StartCountStride
    if any(el):
NameError: global name 'any' is not defined

======================================================================
ERROR: testing auto-conversion of masked arrays and packed integers
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_masked.py", line 54, in setUp
    foo[:] = maskedarr
  File "netCDF4.pyx", line 3108, in netCDF4.Variable.__setitem__ (netCDF4.c:38614)
AttributeError: 'module' object has no attribute 'in1d'

======================================================================
ERROR: testing multi-file dataset access
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_multifile2.py", line 37, in setUp
    dat[:] = data[nx1:nx2]
  File "netCDF4.pyx", line 3108, in netCDF4.Variable.__setitem__ (netCDF4.c:38614)
AttributeError: 'module' object has no attribute 'in1d'

======================================================================
ERROR: testing multi-file dataset access
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seidel/netCDF4-1.0.8/test/tst_multifile.py", line 36, in setUp
    dat[:] = data[nx1:nx2]
  File "netCDF4.pyx", line 3108, in netCDF4.Variable.__setitem__ (netCDF4.c:38614)
AttributeError: 'module' object has no attribute 'in1d'

----------------------------------------------------------------------
Ran 48 tests in 6.989s

FAILED (errors=11)

netcdf4-python version: 1.0.8
HDF5 lib version:       1.8.12
netcdf lib version:     4.3.1.1

What version of the product are you using? On what operating system?

See above. I am running on linux 2.6.18-194.32.1.el5. 64bit with gcc 4.1.2 
20080704

Please provide any additional information below.

The setup.cfg file:

# Rename this file to setup.cfg to set build options.
# Follow instructions below for editing.
[options]
# if true, the nc-config script (installed with netcdf 4.1.2 and higher)
# will be used to determine the locations of required libraries.
use_ncconfig=True
# path to nc-config script.
ncconfig=/usr/local/bin/nc-config 
[directories]
# uncomment and set to netCDF install location.
# Include files should be located in netCDF4_dir/include and
# the library should be located in netCDF4_dir/lib.
# If the libraries and include files are installed in separate locations,
# use netCDF4_libdir and netCDF4_incdir to specify the locations
# separately.  
netCDF4_dir = /usr/local
# uncomment and set to HDF5 install location.
# Include files should be located in HDF5_dir/include and
# the library should be located in HDF5_dir/lib.
# If the libraries and include files are installed in separate locations,
# use HDF5_libdir and HDF5_incdir to specify the locations
# separately.  
HDF5_dir = /usr/local
# if HDF5 was built with szip support as a static lib,
# uncomment and set to szip lib install location.
# If the libraries and include files are installed in separate locations,
# use szip_libdir and szip_incdir.
#szip_dir = /usr/local
# if netcdf lib was build statically with HDF4 support,
# uncomment and set to hdf4 lib (libmfhdf and libdf) nstall location.
# If the libraries and include files are installed in separate locations,
# use hdf4_libdir and hdf4_incdir.
#hdf4_dir = /usr/local
# if netcdf lib was build statically with HDF4 support,
# uncomment and set to jpeg lib install location (hdf4 needs jpeg).
# If the libraries and include files are installed in separate locations,
# use jpeg_libdir and jpeg_incdir.
#jpeg_dir = /usr/local
# if netcdf lib was build statically with OpenDAP support,
# uncomment and set to curl lib install location.
# If the libraries and include files are installed in separate locations,
# use curl_libdir and curl_incdir.
#curl_dir = /usr/local

Original issue reported on code.google.com by hanksei...@gmail.com on 5 Apr 2014 at 2:37

GoogleCodeExporter commented 9 years ago
Looks like you running python 2.4, which is rather ancient.  netcdf4-python 
requires at least python 2.5.

The permission denied error is probably a file system permissions issue.

BTW:  this project has migrated to github, and new issues should be created on 
the github site.

Original comment by whitaker.jeffrey@gmail.com on 5 Apr 2014 at 2:46

GoogleCodeExporter commented 9 years ago
Python 2.7 fixed it. Thanks!

Original comment by hanksei...@gmail.com on 6 Apr 2014 at 2:46