AttributeError: 'tuple' object has no attribute 'shape'

953 views
Skip to first unread message

caia...@gmail.com

unread,
May 4, 2016, 3:29:39 AM5/4/16
to pydap
Hello,

I'm having the following error when accessing a dataset using pydap on Windows Python 2.7:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\pydap\model.py", line 663, in __getitem__
    var.shape = var.data.shape
AttributeError: 'tuple' object has no attribute 'shape'

Here is the code:

from pydap.client import open_url
dataset = open_url('http://oos.soest.hawaii.edu/erddap/griddap/NCEP_Global_Best')
tmpsfc = dataset['tmpsfc']
print(tmpsfc[0, :, :])

The dataset works with netCDF4, but the library does not meet some of the project requirements.

Is it a bug or a misusage of the pydap library?

Thank you,

Caian

Reply all
Reply to author
Forward
0 new messages