IBM / tensorlakehouse-openeo-driver

IBM's OpenSource reference implementation of the OpenEO driver
Apache License 2.0
11 stars 5 forks source link

TypeError: bands is not a dim. If supplying a ``name``, pass as a kwarg. #20

Closed leotizzei closed 5 months ago

leotizzei commented 5 months ago
Traceback (most recent call last):
  File "/opt/app-root/src/tensorlakehouse-openeo-driver/tensorlakehouse_openeo_driver/save_result.py", line 79, in save_result
    ds = array.to_dataset(dim=DEFAULT_BANDS_DIMENSION)
  File "/opt/app-root/lib64/python3.9/site-packages/xarray/core/dataarray.py", line 610, in to_dataset
    raise TypeError(
TypeError: bands is not a dim. If supplying a ``name``, pass as a kwarg.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/app-root/lib64/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/app-root/lib64/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/opt/app-root/lib64/python3.9/site-packages/openeo_driver/users/auth.py", line 88, in decorated
    return f(*args, **kwargs)
  File "/opt/app-root/lib64/python3.9/site-packages/openeo_driver/views.py", line 690, in result
    response = result.create_flask_response()
  File "/opt/app-root/lib64/python3.9/site-packages/openeo_driver/save_result.py", line 159, in create_flask_response
    filename = self.save_result(filename)
  File "/opt/app-root/src/tensorlakehouse-openeo-driver/tensorlakehouse_openeo_driver/save_result.py", line 89, in save_result
    for attr_key, attr_value in ds.attrs.items():
UnboundLocalError: local variable 'ds' referenced before assignment