earthdaily / earthdaily-python-client

EarthDaily python client
https://earthdaily.github.io/earthdaily-python-client/
MIT License
13 stars 7 forks source link

Error on python 3.10 - SyntaxError: invalid syntax #105

Closed robmarkcole closed 1 month ago

robmarkcole commented 1 month ago

Python 3.10.12

Error occurring on Colab and Lightning.ai

from earthdaily import EarthDataStore

eds = EarthDataStore()

Traceback (most recent call last):

  File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "/tmp/ipykernel_1984/195309418.py", line 1, in <cell line: 1>
    from earthdaily import EarthDataStore

  File "/usr/local/lib/python3.10/dist-packages/earthdaily/__init__.py", line 3, in <module>
    from . import earthdatastore, datasets

  File "/usr/local/lib/python3.10/dist-packages/earthdaily/earthdatastore/__init__.py", line 21, in <module>
    from . import _scales_collections, cube_utils, mask

  File "/usr/local/lib/python3.10/dist-packages/earthdaily/earthdatastore/cube_utils/__init__.py", line 10, in <module>
    from ._zonal import zonal_stats

  File "/usr/local/lib/python3.10/dist-packages/earthdaily/earthdatastore/cube_utils/_zonal.py", line 78
    field_arr = dataset[..., *positions[idx]]
                             ^
SyntaxError: invalid syntax
robmarkcole commented 1 month ago

Workaround: earthdaily==0.2.3

nkarasiak commented 1 month ago

Hi @robmarkcole, please try the earthdaily==0.2.11, it should be fixed.

robmarkcole commented 1 month ago

Resolved in 0.2.11