Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Data download error (AEROSOL) #664

Closed
JanisGailis opened this issue Jun 6, 2018 · 8 comments
Closed

Data download error (AEROSOL) #664

JanisGailis opened this issue Jun 6, 2018 · 8 comments
Assignees
Labels

Comments

@JanisGailis
Copy link
Member

Tried downloading a dataset using the following parameters:

cate ds copy esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1 --name AE_UC4_1997_2008_GBT --time "1997-01-01,2008-12-31"  --region " -160,23,-69,50" --vars "absorbing_aerosol_index"

But got the following stack-trace both on GUI and in CLI:

Job: Opening data source "esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1"
Message: Data source "esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1": Copying remote data source failed: [Errno -37] NetCDF: Write to read only: b'http://esgf-data1.ceda.ac.uk/thredds/dodsC/esg_esacci/aerosol/data/MS_UVAI/L3/v1.5.7/MONTHLY/2003/Multi-Sensor_AAI_200305.nc'
Code: -32003
Method: set_workspace_resource
Exception: cate.core.ds.DataAccessError

Traceback (most recent call last):
  File "c:\cate\cate\ds\esa_cci_odp.py", line 745, in _make_local
    excluded_variables])
  File "C:\Users\janis\Miniconda3\envs\cate-env\lib\site-packages\xarray\backends\api.py", line 320, in open_dataset
    **backend_kwargs)
  File "C:\Users\janis\Miniconda3\envs\cate-env\lib\site-packages\xarray\backends\netCDF4_.py", line 332, in open
    ds = opener()
  File "C:\Users\janis\Miniconda3\envs\cate-env\lib\site-packages\xarray\backends\netCDF4_.py", line 231, in _open_netcdf4_group
    ds = nc4.Dataset(filename, mode=mode, **kwargs)
  File "netCDF4\_netCDF4.pyx", line 2015, in netCDF4._netCDF4.Dataset.__init__
  File "netCDF4\_netCDF4.pyx", line 1636, in netCDF4._netCDF4._ensure_nc_success
OSError: [Errno -37] NetCDF: Write to read only: b'http://esgf-data1.ceda.ac.uk/thredds/dodsC/esg_esacci/aerosol/data/MS_UVAI/L3/v1.5.7/MONTHLY/2003/Multi-Sensor_AAI_200305.nc'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\cate\cate\util\web\jsonrpchandler.py", line 209, in send_service_method_result
    result = future.result()
  File "C:\Users\janis\Miniconda3\envs\cate-env\lib\concurrent\futures\_base.py", line 425, in result
    return self.__get_result()
  File "C:\Users\janis\Miniconda3\envs\cate-env\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\janis\Miniconda3\envs\cate-env\lib\concurrent\futures\thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "c:\cate\cate\util\web\jsonrpchandler.py", line 306, in call_service_method
    result = method(*method_params, monitor=monitor)
  File "c:\cate\cate\webapi\websocket.py", line 289, in set_workspace_resource
    monitor=monitor)
  File "c:\cate\cate\core\wsmanag.py", line 317, in set_workspace_resource
    workspace.execute_workflow(res_name=res_name, monitor=monitor)
  File "c:\cate\cate\core\workspace.py", line 612, in execute_workflow
    self.workflow.invoke_steps(steps, context=self._new_context(), monitor=monitor)
  File "c:\cate\cate\core\workflow.py", line 627, in invoke_steps
    steps[0].invoke(context=context, monitor=monitor)
  File "c:\cate\cate\core\workflow.py", line 318, in invoke
    self._invoke_impl(_new_context(context, step=self), monitor=monitor)
  File "c:\cate\cate\core\workflow.py", line 980, in _invoke_impl
    return_value = self._op(monitor=monitor, **input_values)
  File "c:\cate\cate\core\op.py", line 216, in __call__
    return_value = self._wrapped_op(**input_values)
  File "c:\cate\cate\ops\io.py", line 83, in open_dataset
    monitor=monitor)
  File "c:\cate\cate\core\ds.py", line 539, in open_dataset
    monitor=monitor.child(80))
  File "c:\cate\cate\ds\esa_cci_odp.py", line 888, in make_local
    raise e
  File "c:\cate\cate\ds\esa_cci_odp.py", line 881, in make_local
    self._make_local(local_ds, time_range, region, var_names, monitor=monitor)
  File "c:\cate\cate\ds\esa_cci_odp.py", line 825, in _make_local
    raise DataAccessError("Copying remote data source failed: {}".format(e), source=self) from e
cate.core.ds.DataAccessError: Data source "esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1": Copying remote data source failed: [Errno -37] NetCDF: Write to read only: b'http://esgf-data1.ceda.ac.uk/thredds/dodsC/esg_esacci/aerosol/data/MS_UVAI/L3/v1.5.7/MONTHLY/2003/Multi-Sensor_AAI_200305.nc'

Expected behavior

Expected to get the dataset. Note that this dataset has been used in some other use cases and is generally known to be working fine.

Steps to reproduce the problem

Run the cate CLI snippet given above.

Specifications

cate 2.0.0.dev12
cate-desktop 2.0.0.dev12
Windows 10

@hans-permana
Copy link
Contributor

hans-permana commented Jun 6, 2018

I experienced similar issue by trying to download esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1 using Cate Desktop.

The error message is:

Job: Opening data source "esacci.AEROSOL.day.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1"
Message: ValidationError does not take keyword arguments
Code: -32003
Method: set_workspace_resource
Exception: TypeError

Traceback (most recent call last):
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\ds\local.py", line 176, in open_dataset
    excluded_variables], monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\ds.py", line 615, in open_xarray_dataset
    **kwargs)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\xarray\backends\api.py", line 642, in open_mfdataset
    data_vars=data_vars, coords=coords)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\xarray\core\combine.py", line 436, in auto_combine
    for ds in grouped]
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\xarray\core\combine.py", line 436, in <listcomp>
    for ds in grouped]
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\xarray\core\combine.py", line 365, in _auto_concat
    return concat(datasets, dim=dim, data_vars=data_vars, coords=coords)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\xarray\core\combine.py", line 120, in concat
    return f(objs, dim, data_vars, coords, compat, positions)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\xarray\core\combine.py", line 276, in _dataset_concat
    'variable %s not equal across datasets' % k)
ValueError: variable absorbing_aerosol_index not equal across datasets

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\util\web\jsonrpchandler.py", line 209, in send_service_method_result
    result = future.result()
  File "C:\Users\hans\cate-2.0.0.dev12\lib\concurrent\futures\_base.py", line 425, in result
    return self.__get_result()
  File "C:\Users\hans\cate-2.0.0.dev12\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\hans\cate-2.0.0.dev12\lib\concurrent\futures\thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\util\web\jsonrpchandler.py", line 306, in call_service_method
    result = method(*method_params, monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\webapi\websocket.py", line 289, in set_workspace_resource
    monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\wsmanag.py", line 317, in set_workspace_resource
    workspace.execute_workflow(res_name=res_name, monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\workspace.py", line 612, in execute_workflow
    self.workflow.invoke_steps(steps, context=self._new_context(), monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\workflow.py", line 627, in invoke_steps
    steps[0].invoke(context=context, monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\workflow.py", line 318, in invoke
    self._invoke_impl(_new_context(context, step=self), monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\workflow.py", line 980, in _invoke_impl
    return_value = self._op(monitor=monitor, **input_values)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\op.py", line 216, in __call__
    return_value = self._wrapped_op(**input_values)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\ops\io.py", line 83, in open_dataset
    monitor=monitor)
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\ds.py", line 540, in open_dataset
    return data_source.open_dataset(time_range, region, var_names, monitor=monitor.child(20))
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\ds\local.py", line 196, in open_dataset
    raise ValidationError(msg, source=self) from e
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\types.py", line 68, in __init__
    super().__init__(*args, **kwargs)
TypeError: ValidationError does not take keyword arguments

Not sure if these two errors are related.

Specifications

cate 2.0.0.dev12
cate-desktop 2.0.0.dev12
Windows 10 Home

@Evadzi
Copy link

Evadzi commented Jun 7, 2018

I experienced similar issue(but slightly different error message @hans-permana ) by trying to download esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1 using Cate Desktop.
(##other aerosol data also have similar or out of memory error)

The error message is:

Job: Opening data source "esacci.AEROSOL.climatology.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1"
Message: '>=' not supported between instances of 'NoneType' and 'NoneType'
Code: -32003
Method: set_workspace_resource
Exception: TypeError

Traceback (most recent call last):
  File "c:\users\prosper\projects\cate\cate\util\web\jsonrpchandler.py", line 209, in send_service_method_result
    result = future.result()
  File "C:\Users\prosper\AppData\Local\conda\conda\envs\cate-env\lib\concurrent\futures\_base.py", line 425, in result
    return self.__get_result()
  File "C:\Users\prosper\AppData\Local\conda\conda\envs\cate-env\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\prosper\AppData\Local\conda\conda\envs\cate-env\lib\concurrent\futures\thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "c:\users\prosper\projects\cate\cate\util\web\jsonrpchandler.py", line 306, in call_service_method
    result = method(*method_params, monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\webapi\websocket.py", line 289, in set_workspace_resource
    monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\core\wsmanag.py", line 317, in set_workspace_resource
    workspace.execute_workflow(res_name=res_name, monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\core\workspace.py", line 612, in execute_workflow
    self.workflow.invoke_steps(steps, context=self._new_context(), monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\core\workflow.py", line 627, in invoke_steps
    steps[0].invoke(context=context, monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\core\workflow.py", line 318, in invoke
    self._invoke_impl(_new_context(context, step=self), monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\core\workflow.py", line 980, in _invoke_impl
    return_value = self._op(monitor=monitor, **input_values)
  File "c:\users\prosper\projects\cate\cate\core\op.py", line 216, in __call__
    return_value = self._wrapped_op(**input_values)
  File "c:\users\prosper\projects\cate\cate\ops\io.py", line 83, in open_dataset
    monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\core\ds.py", line 539, in open_dataset
    monitor=monitor.child(80))
  File "c:\users\prosper\projects\cate\cate\ds\esa_cci_odp.py", line 888, in make_local
    raise e
  File "c:\users\prosper\projects\cate\cate\ds\esa_cci_odp.py", line 881, in make_local
    self._make_local(local_ds, time_range, region, var_names, monitor=monitor)
  File "c:\users\prosper\projects\cate\cate\ds\esa_cci_odp.py", line 818, in _make_local
    local_ds.add_dataset(os.path.join(local_id, filename), (coverage_from, coverage_to))
  File "c:\users\prosper\projects\cate\cate\ds\local.py", line 364, in add_dataset
    self._extend_temporal_coverage(time_coverage)
  File "c:\users\prosper\projects\cate\cate\ds\local.py", line 384, in _extend_temporal_coverage
    if time_range[0] >= self._temporal_coverage[1]:
TypeError: '>=' not supported between instances of 'NoneType' and 'NoneType'

Expected behavior:

Expected to get the dataset for an exercise. This dataset has been used in some other use cases and is generally known to be working fine.

Steps to reproduce the problem
Run the cate CLI snippet given above.

Specifications
cate 2.0.0.dev12
cate-desktop 2.0.0.dev12
Windows 10

@forman
Copy link
Member

forman commented Jun 7, 2018

@papesci could you please have a look at this, it seems to be a local data access problem.

@forman
Copy link
Member

forman commented Jun 7, 2018

@papesci should you already be working on this, please set the "in_progress" label.

@papesci
Copy link
Contributor

papesci commented Jun 12, 2018

Hi all, i have tried to reproduce this morning the error from a Linux machine and it is working fine.
Unfortunately my network restriction doesn't allow me to try it from a window 10, we asked to open the network to ODP server but is not immediate.

@forman
Copy link
Member

forman commented Jun 13, 2018

@papesci I meanwhile fixed the error of @hans-permana above whose traceback ended with

  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\ds\local.py", line 196, in open_dataset
    raise ValidationError(msg, source=self) from e
  File "C:\Users\hans\cate-2.0.0.dev12\lib\site-packages\cate\core\types.py", line 68, in __init__
    super().__init__(*args, **kwargs)
TypeError: ValidationError does not take keyword arguments

Similar to #677, this an error due to untested code in cate/ds/local.py that you checked in. Please write unit-tests.

@forman
Copy link
Member

forman commented Sep 10, 2018

@papesci I again ran into the error already reported by @hans-permana:

Job: Opening data source "esacci.AEROSOL.climatology.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1"
Message: '>=' not supported between instances of 'NoneType' and 'NoneType'
Code: -32003
Method: set_workspace_resource
Exception: TypeError

Traceback (most recent call last):
  File "D:\Miniconda3\lib\site-packages\cate\util\web\jsonrpchandler.py", line 209, in send_service_method_result
    result = future.result()
  File "D:\Miniconda3\lib\concurrent\futures\_base.py", line 398, in result
    return self.__get_result()
  File "D:\Miniconda3\lib\concurrent\futures\_base.py", line 357, in __get_result
    raise self._exception
  File "D:\Miniconda3\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "D:\Miniconda3\lib\site-packages\cate\util\web\jsonrpchandler.py", line 306, in call_service_method
    result = method(*method_params, monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\webapi\websocket.py", line 291, in set_workspace_resource
    monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\core\wsmanag.py", line 317, in set_workspace_resource
    workspace.execute_workflow(res_name=res_name, monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\core\workspace.py", line 612, in execute_workflow
    self.workflow.invoke_steps(steps, context=self._new_context(), monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\core\workflow.py", line 627, in invoke_steps
    steps[0].invoke(context=context, monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\core\workflow.py", line 318, in invoke
    self._invoke_impl(_new_context(context, step=self), monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\core\workflow.py", line 980, in _invoke_impl
    return_value = self._op(monitor=monitor, **input_values)
  File "D:\Miniconda3\lib\site-packages\cate\core\op.py", line 216, in __call__
    return_value = self._wrapped_op(**input_values)
  File "D:\Miniconda3\lib\site-packages\cate\ops\io.py", line 83, in open_dataset
    monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\core\ds.py", line 588, in open_dataset
    monitor=monitor.child(80))
  File "D:\Miniconda3\lib\site-packages\cate\ds\esa_cci_odp.py", line 1006, in make_local
    raise e
  File "D:\Miniconda3\lib\site-packages\cate\ds\esa_cci_odp.py", line 999, in make_local
    self._make_local(local_ds, time_range, region, var_names, monitor=monitor)
  File "D:\Miniconda3\lib\site-packages\cate\ds\esa_cci_odp.py", line 936, in _make_local
    local_ds.add_dataset(os.path.join(local_id, filename), (coverage_from, coverage_to))
  File "D:\Miniconda3\lib\site-packages\cate\ds\local.py", line 365, in add_dataset
    self._extend_temporal_coverage(time_coverage)
  File "D:\Miniconda3\lib\site-packages\cate\ds\local.py", line 385, in _extend_temporal_coverage
    if time_range[0] >= self._temporal_coverage[1]:
TypeError: '>=' not supported between instances of 'NoneType' and 'NoneType'

The code in cate/ds/local.py, line 385 in _extend_temporal_coverage is indeed buggy because it does not check if tuple items are None. It is also not clear, why the type of argument time_range is the generic TimeRangeLike.TYPE in _extend_temporal_coverage. It should be very clear which type it is, because it originates from our own JSON cataloague.

@papesci
Copy link
Contributor

papesci commented Sep 28, 2018

branch 664 contain additional check on the value of TimeRange parameter to avoid wrong assignment. Well i have the same though of @forman but i think is better to maintain the original type, i guess that the developer has used a more generic type to allow a more flexible use of the method.

@papesci papesci closed this as completed Oct 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants