Skip to content

Conversation

@brian-rose
Copy link
Member

This PR brings in several updates from the Cookbook template, including links to the new Pythia binder.

It should fix the current link-checker error.

@github-actions
Copy link

github-actions bot commented Jun 16, 2023

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below.
🔍 Git commit SHA: 3419ec0
✅ Deployment Preview URL: In Progress

@brian-rose
Copy link
Member Author

@droumis there's a problem with the build that I don't know how to address here.

In the notebook 2.0_Preprocessing.ipynb there's an runtime error:

---------------------------------------------------------------------------
[86](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:87)
AttributeError                            Traceback (most recent call last)
[87](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:88)
Cell In[16], line 1
[88](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:89)
----> 1 landsat_8_da.crs
[89](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:90)

[90](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:91)
File /usr/share/miniconda3/envs/cookbook-dev/lib/python3.10/site-packages/xarray/core/common.py:276, in AttrAccessMixin.__getattr__(self, name)
[91](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:92)
    274         with suppress(KeyError):
[92](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:93)
    275             return source[name]
[93](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:94)
--> 276 raise AttributeError(
[94](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:95)
    277     f"{type(self).__name__!r} object has no attribute {name!r}"
[95](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:96)
    278 )
[96](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:97)

[97](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:98)
AttributeError: 'DataArray' object has no attribute 'crs'
[98](https://github.com/ProjectPythia/landsat-ml-cookbook/actions/runs/5294248632/jobs/9583379042?pr=18#step:17:99)

I reproduced the same error running the notebook locally on my laptop.

It looks like the .crs metadata is absent from the dataset. Was there some upstream change in the data format?

@droumis
Copy link
Member

droumis commented Jun 23, 2023

strange... I can't reproduce

@ahuang11 could you help me with this? Could you see if 2.0_Preprocessing.ipynb works for you?

@ahuang11
Copy link
Collaborator

I believe if you have the latest versions, the crs is nested under rio(xarray): landsat_8_da.rio.crs
image

@droumis
Copy link
Member

droumis commented Jul 14, 2023

I have pinned some packages to avoid this, and a few other issues.

@droumis
Copy link
Member

droumis commented Jul 14, 2023

It seems there are more issues with open_rasterio... I'll try come back to this when I have time but please go ahead if anyone else wants to take a swing at it.

It also looks like there are issues towards the end of the spectral clustering notebook

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

Successfully merging this pull request may close these issues.

4 participants