Skip to content

Testing fails with Pydap 3.2.1 on Debian #1370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghisvail opened this issue Apr 12, 2017 · 1 comment
Closed

Testing fails with Pydap 3.2.1 on Debian #1370

ghisvail opened this issue Apr 12, 2017 · 1 comment

Comments

@ghisvail
Copy link
Contributor

I have updated the Debian packaging with xarray version 0.9.2 and tried to run the tests with some of its optional dependencies enabled.

The pydap specific tests fail with the following log:

============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-3.0.6, py-1.4.32, pluggy-0.4.0
rootdir: /tmp/autopkgtest.tfmbWT/autopkgtest_tmp, inifile: 
collected 2406 items / 1 skipped

. .......................................................................................................................................................................................................................................................................................................................................................................................................................................................x.....................................XxxxxxxxxXxxxXXxXXXXXxxXxxxxxxxxxxxxxxXXXx.s.sssxs....X.X.....XX.XXX.XXXXXX...X....X.X.....XX.XXX.XXXXXX...XFFssssssssssssssssssssssssssssssssssssssssssssssssssssss...............................................................................ssss.s.s.sssssssssssssssXs..s.......................................................................................................s.........................................................s..............................................................s.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................s......s......s...........................s......s......s.....................s....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................s.............................................................................................................................................................

=================================== FAILURES ===================================
________________________ PydapTest.test_cmp_local_file _________________________

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
attr = 'iteritems'

    def __getattr__(self, attr):
        """Lazy shortcut return children."""
        try:
>           return self[attr]

/usr/lib/python3/dist-packages/pydap/model.py:295: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
key = 'iteritems'

    def __getitem__(self, key):
        key = quote(key)
>       return self._dict[key]
E       KeyError: 'iteritems'

/usr/lib/python3/dist-packages/pydap/model.py:326: KeyError

During handling of the above exception, another exception occurred:

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
attr = 'iteritems'

    def __getattr__(self, attr):
        """Attribute shortcut.
    
            Data classes have their attributes stored in the `attributes`
            attribute, a dictionary. For convenience, access to attributes can be
            shortcut by accessing the attributes directly::
    
                >>> var = DapType('var')
                >>> var.attributes['foo'] = 'bar'
                >>> print(var.foo)
                bar
    
            This will return the value stored under `attributes`.
    
            """
        try:
>           return self.attributes[attr]
E           KeyError: 'iteritems'

/usr/lib/python3/dist-packages/pydap/model.py:180: KeyError

During handling of the above exception, another exception occurred:

self = <xarray.tests.test_backends.PydapTest testMethod=test_cmp_local_file>

    def test_cmp_local_file(self):
>       with self.create_datasets() as (actual, expected):

/usr/lib/python3/dist-packages/xarray/tests/test_backends.py:1341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.5/contextlib.py:59: in __enter__
    return next(self.gen)
/usr/lib/python3/dist-packages/xarray/tests/test_backends.py:1331: in create_datasets
    actual = open_dataset(url, engine='pydap', **kwargs)
/usr/lib/python3/dist-packages/xarray/backends/api.py:310: in open_dataset
    return maybe_decode_store(store, lock)
/usr/lib/python3/dist-packages/xarray/backends/api.py:226: in maybe_decode_store
    drop_variables=drop_variables)
/usr/lib/python3/dist-packages/xarray/conventions.py:942: in decode_cf
    vars, attrs = obj.load()
/usr/lib/python3/dist-packages/xarray/backends/common.py:122: in load
    for k, v in self.get_variables().items())
/usr/lib/python3/dist-packages/xarray/backends/pydap_.py:73: in get_variables
    for k, v in self.ds.iteritems())
/usr/lib/python3/dist-packages/pydap/model.py:297: in __getattr__
    return DapType.__getattr__(self, attr)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
attr = 'iteritems'

    def __getattr__(self, attr):
        """Attribute shortcut.
    
            Data classes have their attributes stored in the `attributes`
            attribute, a dictionary. For convenience, access to attributes can be
            shortcut by accessing the attributes directly::
    
                >>> var = DapType('var')
                >>> var.attributes['foo'] = 'bar'
                >>> print(var.foo)
                bar
    
            This will return the value stored under `attributes`.
    
            """
        try:
            return self.attributes[attr]
        except (KeyError, TypeError):
            raise AttributeError(
                "'%s' object has no attribute '%s'"
>               % (self.__class__, attr))
E           AttributeError: '<class 'pydap.model.DatasetType'>' object has no attribute 'iteritems'

/usr/lib/python3/dist-packages/pydap/model.py:184: AttributeError
_____________________________ PydapTest.test_dask ______________________________

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
attr = 'iteritems'

    def __getattr__(self, attr):
        """Lazy shortcut return children."""
        try:
>           return self[attr]

/usr/lib/python3/dist-packages/pydap/model.py:295: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
key = 'iteritems'

    def __getitem__(self, key):
        key = quote(key)
>       return self._dict[key]
E       KeyError: 'iteritems'

/usr/lib/python3/dist-packages/pydap/model.py:326: KeyError

During handling of the above exception, another exception occurred:

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
attr = 'iteritems'

    def __getattr__(self, attr):
        """Attribute shortcut.
    
            Data classes have their attributes stored in the `attributes`
            attribute, a dictionary. For convenience, access to attributes can be
            shortcut by accessing the attributes directly::
    
                >>> var = DapType('var')
                >>> var.attributes['foo'] = 'bar'
                >>> print(var.foo)
                bar
    
            This will return the value stored under `attributes`.
    
            """
        try:
>           return self.attributes[attr]
E           KeyError: 'iteritems'

/usr/lib/python3/dist-packages/pydap/model.py:180: KeyError

During handling of the above exception, another exception occurred:

self = <xarray.tests.test_backends.PydapTest testMethod=test_dask>

    @requires_dask
    def test_dask(self):
>       with self.create_datasets(chunks={'j': 2}) as (actual, expected):

/usr/lib/python3/dist-packages/xarray/tests/test_backends.py:1361: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.5/contextlib.py:59: in __enter__
    return next(self.gen)
/usr/lib/python3/dist-packages/xarray/tests/test_backends.py:1331: in create_datasets
    actual = open_dataset(url, engine='pydap', **kwargs)
/usr/lib/python3/dist-packages/xarray/backends/api.py:310: in open_dataset
    return maybe_decode_store(store, lock)
/usr/lib/python3/dist-packages/xarray/backends/api.py:226: in maybe_decode_store
    drop_variables=drop_variables)
/usr/lib/python3/dist-packages/xarray/conventions.py:942: in decode_cf
    vars, attrs = obj.load()
/usr/lib/python3/dist-packages/xarray/backends/common.py:122: in load
    for k, v in self.get_variables().items())
/usr/lib/python3/dist-packages/xarray/backends/pydap_.py:73: in get_variables
    for k, v in self.ds.iteritems())
/usr/lib/python3/dist-packages/pydap/model.py:297: in __getattr__
    return DapType.__getattr__(self, attr)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross', 'i', 'j', 'l'>
attr = 'iteritems'

    def __getattr__(self, attr):
        """Attribute shortcut.
    
            Data classes have their attributes stored in the `attributes`
            attribute, a dictionary. For convenience, access to attributes can be
            shortcut by accessing the attributes directly::
    
                >>> var = DapType('var')
                >>> var.attributes['foo'] = 'bar'
                >>> print(var.foo)
                bar
    
            This will return the value stored under `attributes`.
    
            """
        try:
            return self.attributes[attr]
        except (KeyError, TypeError):
            raise AttributeError(
                "'%s' object has no attribute '%s'"
>               % (self.__class__, attr))
E           AttributeError: '<class 'pydap.model.DatasetType'>' object has no attribute 'iteritems'

/usr/lib/python3/dist-packages/pydap/model.py:184: AttributeError
= 2 failed, 2238 passed, 94 skipped, 31 xfailed, 42 xpassed in 119.28 seconds ==
@shoyer
Copy link
Member

shoyer commented Apr 12, 2017

Thanks for the report!

The is a duplicate of #1174, which hopefully we can resolve after the next pydap release (in addition to iteritems() vs items(), there were some inadvertent API changes upstream which broke our integration).

@shoyer shoyer closed this as completed Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants