orginal error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Input In [15], in <cell line: 4>()
1 # The download task requires additional arguments at execution. These are linked to the node the task is in.
2 download_node = workflow_nodes[0]
----> 4 result = workflow.execute(
5 {
6 download_node: {"bbox": dam_bbox, "time_interval": time_interval},
7 }
8 )
File c:\users\basin\appdata\local\programs\python\python38\lib\site-packages\eolearn\core\eoworkflow.py:152, in EOWorkflow.execute(self, input_kwargs, raise_errors)
149 self.validate_input_kwargs(input_kwargs)
150 uid_input_kwargs = {node.uid: args for node, args in input_kwargs.items()}
--> 152 output_results, stats_dict = self._execute_nodes(
153 uid_input_kwargs=uid_input_kwargs, out_degrees=out_degrees, raise_errors=raise_errors
154 )
156 results = WorkflowResults(
157 outputs=output_results, start_time=start_time, end_time=dt.datetime.now(), stats=stats_dict
158 )
160 LOGGER.debug("EOWorkflow ended with results %s", repr(results))
File c:\users\basin\appdata\local\programs\python\python38\lib\site-packages\eolearn\core\eoworkflow.py:205, in EOWorkflow._execute_nodes(self, uid_input_kwargs, out_degrees, raise_errors)
202 stats_dict = {}
204 for node in self._nodes:
--> 205 result, stats = self._execute_node(
206 node=node,
207 node_input_values=[intermediate_results[input_node.uid] for input_node in node.inputs],
208 node_input_kwargs=uid_input_kwargs.get(node.uid, {}),
209 raise_errors=raise_errors,
210 )
212 stats_dict[node.uid] = stats
213 if stats.exception is not None:
File c:\users\basin\appdata\local\programs\python\python38\lib\site-packages\eolearn\core\eoworkflow.py:239, in EOWorkflow._execute_node(self, node, node_input_values, node_input_kwargs, raise_errors)
237 LOGGER.debug("Computing %s(*%s, **%s)", node.task.__class__.__name__, str(task_args), str(node_input_kwargs))
238 start_time = dt.datetime.now()
--> 239 result, is_success = self._execute_task(node.task, task_args, node_input_kwargs, raise_errors=raise_errors)
240 end_time = dt.datetime.now()
242 if is_success:
File c:\users\basin\appdata\local\programs\python\python38\lib\site-packages\eolearn\core\eoworkflow.py:267, in EOWorkflow._execute_task(task, task_args, task_kwargs, raise_errors)
265 """Executes an EOTask and handles any potential exceptions."""
266 if raise_errors:
--> 267 return task.execute(*task_args, **task_kwargs), True
269 try:
270 return task.execute(*task_args, **task_kwargs), True
Input In [12], in WaterDetectionTask.execute(self, eopatch)
13 water_masks = np.asarray([self.detect_water(ndwi[..., 0]) for ndwi in eopatch.data["NDWI"]])
15 # we're only interested in the water within the dam borders
---> 16 water_masks = water_masks[..., np.newaxis] * eopatch.mask_timeless["NOMINAL_WATER"]
18 water_levels = np.asarray(
19 [np.count_nonzero(mask) / np.count_nonzero(eopatch.mask_timeless["NOMINAL_WATER"]) for mask in water_masks]
20 )
22 eopatch[FeatureType.MASK, "WATER_MASK"] = water_masks
ValueError: operands could not be broadcast together with shapes (0,1) (818,1003,1)