I'm doing some development in Python 3.9 and just run into an issue. When importing odc.stac, I get a call back to an issue in odc.geo.cog.
As a minimum demonstration, if I run import odc.geo.cog in a Python 3.9.19, I get the following traceback:
File "<stdin>", line 1, in <module>
File "/Users/caitlinadams/opt/miniconda3/envs/remotesensingtools/lib/python3.9/site-packages/odc/geo/cog/__init__.py", line 1, in <module>
from ._rio import to_cog, write_cog, write_cog_layers
File "/Users/caitlinadams/opt/miniconda3/envs/remotesensingtools/lib/python3.9/site-packages/odc/geo/cog/_rio.py", line 87, in <module>
xx: xr.DataArray | list[xr.DataArray],
TypeError: unsupported operand type(s) for |: 'type' and 'types.GenericAlias'
I'm doing some development in Python 3.9 and just run into an issue. When importing
odc.stac
, I get a call back to an issue inodc.geo.cog
.As a minimum demonstration, if I run
import odc.geo.cog
in a Python 3.9.19, I get the following traceback:It's specifically pointing at
It looks like the
|
operation for Union was only introduced in Python 3.10 (https://docs.python.org/3/library/typing.html#typing.Union), but on pypi, it states thatodc.geo
requires Python >=3.8.My suggestions would be either:
Union
instead of|