opengeos / streamlit-geospatial

A multi-page streamlit app for geospatial
https://huggingface.co/spaces/giswqs/Streamlit
MIT License
860 stars 387 forks source link

Fail to deploy on Streamlit #94

Closed KHwong12 closed 1 year ago

KHwong12 commented 1 year ago

Hi Dr. Wu, first thing first, many thanks for creating this fascinating web app.

I followed your blog, created a fork of this repo and tried to deploy a copy of the app to Streamlit. I followed the steps and created a token and added it as an environment variable.

However, the deploy log still requires me to authenticate GEE, and the error Earth Engine client library not initialized. appears when I try to upload the study boundary.

Following are the screenshots of the secret token configuration and the deploy log. Is there something I did wrong when configuring the app/authenticating GEE?


Setting token as environment variable

secret-token

Error when adding study boundary

https://user-images.githubusercontent.com/29334677/201335429-5c5abb14-6ddb-4cc3-b0fa-4346ffe2ae53.mp4

Deploy log of error

deploy-log-require-auth
giswqs commented 1 year ago

The EARTHENGINE_TOKEN should look like this. Use ee.Authenticate() on your computer to generate a new token if needed.

image

KHwong12 commented 1 year ago

Thanks! The app works perfectly now. Originally I thought the EARTHENGINE_TOKEN only includes the refresh_token part of the JSON.