Skip to content
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

🐛[BUG]: Intermittent failures in test_healpix.py pytest. #608

Open
ktangsali opened this issue Jul 19, 2024 · 0 comments
Open

🐛[BUG]: Intermittent failures in test_healpix.py pytest. #608

ktangsali opened this issue Jul 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ktangsali
Copy link
Collaborator

ktangsali commented Jul 19, 2024

Version

source - main

On which installation method(s) does this occur?

Docker

Describe the issue

The test_healpix.py can sometimes report a failure if run with the full pytest suite. This however passes if the test is executed individually. The error is similar to the issue here: Unidata/netcdf4-python#1343. The discussion suggests issue with the particular netcdf version and potentially a newer version will help.

Downgrading the netcdf version to 1.6.5 also helps.

Minimum reproducible example

No response

Relevant log output

_______________________ test_open_time_series_on_the_fly _______________________

self = CachingFileManager(<class 'netCDF4._netCDF4.Dataset'>, '/data/nfs/modulus-data/datasets/healpix/merge/z1000.nc', mode=...r': True, 'diskless': False, 'persist': False, 'format': 'NETCDF4'}, manager_id='2509f805-6f7f-4ab1-952a-f9a698464d2c')
needs_lock = True

    def _acquire_with_cache_info(self, needs_lock=True):
        """Acquire a file, returning the file and whether it was cached."""
        with self._optional_lock(needs_lock):
            try:
>               file = self._cache[self._key]

/usr/local/lib/python3.10/dist-packages/xarray/backends/file_manager.py:211: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <xarray.backends.lru_cache.LRUCache object at 0x7fdf674382c0>
key = [<class 'netCDF4._netCDF4.Dataset'>, ('/data/nfs/modulus-data/datasets/healpix/merge/z1000.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False)), '2509f805-6f7f-4ab1-952a-f9a698464d2c']

    def __getitem__(self, key: K) -> V:
        # record recent use of the key by moving it to the front of the list
        with self._lock:
>           value = self._cache[key]
E           KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('/data/nfs/modulus-data/datasets/healpix/merge/z1000.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False)), '2509f805-6f7f-4ab1-952a-f9a698464d2c']

/usr/local/lib/python3.10/dist-packages/xarray/backends/lru_cache.py:56: KeyError

Environment details

No response

@ktangsali ktangsali added bug Something isn't working ? - Needs Triage Need team to review and classify labels Jul 19, 2024
@NickGeneva NickGeneva removed the ? - Needs Triage Need team to review and classify label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants