Open-EO / openeo-python-client

Python client API for OpenEO
https://open-eo.github.io/openeo-python-client/
Apache License 2.0
156 stars 42 forks source link

Receive `asyncio - ERROR - Unclosed client session` when starting job #600

Closed p-phung closed 3 months ago

p-phung commented 3 months ago

I followed this example code to download some GFM data. It happened on OpenEO Editor, OpenEO Lab and a local jupyter notebook (python 3.9). All returns the same error as below. I couldn't find much info about this online.

Probably one of the past jobs leaves hanging and it is not properly closed. Or something else happens? Could you advise what to do here?

▸
2024-08-08 07:39:21,330 - openeo_executor.cli - INFO - Running openeo-executor v2024.7.23
2024-08-08 07:39:21,330 - openeo_executor.cli - INFO - Using processes from openeo-processes-dask v2024.5.2
2024-08-08 07:39:54,263 - openeo_processes_dask.process_implementations.core - INFO - Running process load_collection
2024-08-08 07:39:54,505 - openeo_executor.extra_process_implementations.process_implementations._io - WARNING - Xarray CRS: None. Spatial Extent CRS: GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]
2024-08-08 07:39:54,649 - openeo_executor.extra_process_implementations.process_implementations._io - WARNING - Stac loaded xarray could not be filtered to original bbox query. Result will be larger than original query.
2024-08-08 07:39:54,650 - openeo_processes_dask.process_implementations.core - INFO - Running process save_result
/openeo-executor/openeo_executor/equi7grid.py:244: UserWarning: The `squeeze` kwarg to GroupBy is being removed.Pass .groupby(..., squeeze=False) to disable squeezing, which is the new default, and to silence this warning.
times, dataarrays = zip(*data.groupby(time_dimension))
Traceback (most recent call last):
File "/openeo-executor/.venv/lib/python3.11/site-packages/openeo_pg_parser_networkx/graph.py", line 399, in node_callable
return results_cache.__getitem__(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'root-aad324aa-45ca-4edd-97a5-150c7d687363'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/openeo-executor/.venv/bin/openeo_executor", line 6, in <module>
sys.exit(cli())
^^^^^
File "/openeo-executor/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openeo-executor/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/openeo-executor/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openeo-executor/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openeo-executor/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openeo-executor/openeo_executor/cli.py", line 114, in execute
executor.execute(parsed_graph=parsed_graph)
File "/openeo-executor/openeo_executor/executor.py", line 221, in execute
pg_callable()
File "/openeo-executor/.venv/lib/python3.11/site-packages/openeo_pg_parser_networkx/graph.py", line 412, in node_callable
result = prebaked_process_impl(
^^^^^^^^^^^^^^^^^^^^^^
File "/openeo-executor/.venv/lib/python3.11/site-packages/openeo_processes_dask/process_implementations/core.py", line 90, in wrapper
return f(*resolved_args, **resolved_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openeo-executor/openeo_executor/extra_process_implementations/process_implementations/_io.py", line 753, in save_result
raise Exception("No tiles could be derived from given dataset")
Exception: No tiles could be derived from given dataset
2024-08-08 07:40:00,004 - asyncio - ERROR - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f2c403bdb90>
time="2024-08-08T07:40:01.638Z" level=info msg="sub-process exited" argo=true error="<nil>"
Error: exit status 1
jdries commented 3 months ago

@ValentinaHutter do you know more about this sample? It's probably not an issue in the python client.

ValentinaHutter commented 3 months ago

Sorry for the delay, I am looking into this today!

ValentinaHutter commented 3 months ago

We currently have some issues with the stac collection, I will let you know once these are resolved.

p-phung commented 3 months ago

thanks for the heads up. Yes, please let me know!

soxofaan commented 3 months ago

Indeed this is not an issue with https://github.com/Open-EO/openeo-python-client but more likely https://github.com/Open-EO/openeo-processes-dask or a related component.

Unfortunately it seems I can not transfer this issue to that repo, so I created new ticket https://github.com/Open-EO/openeo-processes-dask/issues/265 and I'll close this one

ValentinaHutter commented 3 months ago

This should now work again, but you have to change the names of the bands, see https://github.com/Open-EO/openeo-processes-dask/issues/265 will be updated in the community-examples soon. (currently it's an open PR, I don't have permission to merge it.)