Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example02.ipynb fails to run in Colab #1

Open
SprinterDave opened this issue Jan 10, 2025 · 2 comments
Open

example02.ipynb fails to run in Colab #1

SprinterDave opened this issue Jan 10, 2025 · 2 comments

Comments

@SprinterDave
Copy link

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.

@SprinterDave
Copy link
Author

Thanks for the quick response and the updated links! Great work from you and your team!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants