Closed EmileSonneveld closed 2 months ago
Python snippet to show truncated error:
url = "https://openeo-staging.dataspace.copernicus.eu/"
connection = openeo.connect(url).authenticate_oidc()
spatial_extent_tap = {
"east": 5.08,
"north": 51.22,
"south": 51.215,
"west": 5.07,
}
datacube = connection.load_collection(
"SENTINEL2_L2A",
spatial_extent=spatial_extent_tap,
temporal_extent=["2023-06-01", "2023-06-20"],
bands=['B04', 'B03', 'B02'],
properties={"eo:cloud_cover": lambda v: v <= 95},
)
UDF_code = """
import xarray
from openeo.udf import XarrayDataCube
def apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:
def recursive_crash(counter_arg):
def internal(counter):
if counter <= 0:
raise Exception("recursive_crash Exception!")
else:
recursive_crash(counter - 1)
internal(counter_arg)
recursive_crash(200)
return XarrayDataCube(cube.get_array())
"""
datacube = datacube.apply_dimension(dimension="t", code=UDF_code, runtime="Python")
datacube.download()
The most interesting part of the UDF trace are at the beginning and end. This error got truncated at the end, making it useless.
Trunking lines in the middle and printing
... skipped stack frames ...
should be more handy