IndigoWizard / NDVI-Viewer

Monitor Vegetation Health by Viewing & Comparing NDVI Values & Satellite Images On The Fly!
https://ndvi-viewer.streamlit.app/
16 stars 6 forks source link

App crashes due to absent B8 when trying to calculate Nomalized Difference with absent data from current day #29

Closed IndigoWizard closed 11 months ago

IndigoWizard commented 11 months ago

The placeholder of the st.date_input streamlit widget was set to the current day, which turns out to be inconvenient as satellite images aren't always available on a daily basis in the dataset or not captured yet, so when the app starts and tries to retrieve a dataset from the current day that is nonexistent it sends an error and dont display the page:

ee.ee_exception.EEException: Image.normalizedDifference: No band named 'B8'. Available band names: [].

malloc(): unsorted double linked list corrupted

Note: this issue is not the sole reason the app crashes, the heavy load of users also causes the app to crash when exceeding free tier allocated resources.