Skip to content

example02.ipynb fails to run in Colab #1

Description

@SprinterDave

The cloudsen12 example in Colab doesn't appear to run successfully. Specifically step 3. Create a Maskay dict object fails with the following...

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-6-84414c94bd67>](https://localhost:8080/#) in <cell line: 9>()
      7     sensor="Sentinel-2"
      8 )
----> 9 tensor = cloudsen12.TensorSat(**S2files.to_dict(), cache=True, align=False)

2 frames
[/usr/local/lib/python3.10/dist-packages/maskay/tensorsat.py](https://localhost:8080/#) in to_xarray(self, object)
     98         """
     99         if isinstance(object, str):
--> 100             with rioxarray.open_rasterio(object, "r") as src:
    101                 raster = np.squeeze(src, axis=0)
    102                 if self.cache:

TypeError: open_rasterio() takes 1 positional argument but 2 were given

rioxarray.open_rasterio takes only 1 positional argument but 2 are being given in maskay/tensorsat.py

A change in rioxarray (0.17.0 -> 0.18.0) introduced a change to the positional argument, but I'm not sure what keyword argument the "r" is intended for.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions