You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
I get IndexError: index 1 is out of bounds for axis 0 with size 0:
Cate Desktop, version 1.0.1-dev.1
set_workspace_resource() call raised exception: "index 1 is out of bounds for axis 0 with size 0"
An error (code 20) occurred in Cate Core:
Traceback (most recent call last):
File "D:\Projects\cate\cate\util\web\jsonrpchandler.py", line 192, in send_service_method_result
result = future.result()
File "D:\Miniconda3\envs\cate-env\lib\concurrent\futures\_base.py", line 398, in result
return self.__get_result()
File "D:\Miniconda3\envs\cate-env\lib\concurrent\futures\_base.py", line 357, in __get_result
raise self._exception
File "D:\Miniconda3\envs\cate-env\lib\concurrent\futures\thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\Projects\cate\cate\util\web\jsonrpchandler.py", line 269, in call_service_method
result = method(*method_params, monitor=monitor)
File "D:\Projects\cate\cate\webapi\websocket.py", line 284, in set_workspace_resource
monitor=monitor)
File "D:\Projects\cate\cate\core\wsmanag.py", line 323, in set_workspace_resource
workspace.execute_workflow(res_name=res_name, monitor=monitor)
File "D:\Projects\cate\cate\core\workspace.py", line 600, in execute_workflow
self.workflow.invoke_steps(steps, context=self._new_context(), monitor=monitor)
File "D:\Projects\cate\cate\core\workflow.py", line 632, in invoke_steps
step.invoke(context=context, monitor=monitor.child(work=1))
File "D:\Projects\cate\cate\core\workflow.py", line 318, in invoke
self._invoke_impl(_new_context(context, step=self), monitor=monitor)
File "D:\Projects\cate\cate\core\workflow.py", line 980, in _invoke_impl
return_value = self._op(monitor=monitor, **input_values)
File "D:\Projects\cate\cate\core\op.py", line 215, in __call__
return_value = self._wrapped_op(**input_values)
File "D:\Projects\cate\cate\ops\subset.py", line 57, in subset_spatial
return adjust_spatial_attrs(subset_spatial_impl(ds, region, mask))
File "D:\Projects\cate\cate\core\op.py", line 215, in __call__
return_value = self._wrapped_op(**input_values)
File "D:\Projects\cate\cate\ops\normalize.py", line 78, in adjust_spatial_attrs
return adjust_spatial_attrs_impl(ds)
File "D:\Projects\cate\cate\util\opimpl.py", line 176, in adjust_spatial_attrs_impl
geoattrs = _get_spatial_props(ds, dim)
File "D:\Projects\cate\cate\util\opimpl.py", line 285, in _get_spatial_props
dim_res = abs(ds[dim].values[1] - ds[dim].values[0])
IndexError: index 1 is out of bounds for axis 0 with size 0
Specifications
Cate 1.0.1.dev1
The text was updated successfully, but these errors were encountered:
Currently, only the cells completely inside the region are selected. The operation also fails if only a single cell is selected that way. But single cell selection should of course be valid and produce a "normal" dataset subset (see also #555).
Expected behavior
subset_spatial
should work with all valid polygons regardless of their actual spatial extent.Actual behavior
If I invoke
subset_spatial
withds
:and
region
WKT defining the following, rather small polygon from ESA CCI Glaciers dataset:I get
IndexError: index 1 is out of bounds for axis 0 with size 0
:Specifications
Cate 1.0.1.dev1
The text was updated successfully, but these errors were encountered: