Christopher Anderson
unread,Jul 1, 2022, 9:04:27 PM7/1/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to California Forest Observatory Community, Casey McGonigle, Joyce Li, Jenna Morabito, Kaavya Shah, Meer Wu
Hi Casey et al.,
Apologies for the slow reply.
It looks like GDAL updated how they manage Google Cloud authentication. D'oh!
But I think I may have fixed the issue on our backend with no additional effort required on your part. Please try and rerun those code blocks and let me know if the error persists.
If it does persist, you might find some useful information on GDAL's
virtual raster driver guide. I think there are two options you can try out below.
Open public access
It looks like the first option in the GCP guide might work well, where you set the environment variable "GS_NO_SIGN_REQUEST=YES". This should work because the Forest Observatory bucket is set to public read access. But I haven't tested it before (requires gdal >3.4, so be sure to upgrade before trying).
You'll just need to set that as an environment variable. You could either do that via your machine (say, in your `$HOME/.bashrc` file on linux or mac, or [google how to do this] on Windows), or you can set them within python like this:
import os
os.environ["GS_NO_SIGN_REQUEST"] = "YES"
Add that to a code block in the notebook somewhere before making the pixel_project call and I think you'll be good.
If you try this and it works, please let me know and I'll make that update to the cfo python API to handle this automatically for users. The bucket is public but google makes you authenticate anyway which.... would be great to workaround.
Using your own GCP ID
I think you've done most of the work you would need to do regarding setting up your access key and key ID. I think the last remaining task would be to set those values that you got from the stack overflow post as environment variables. Again from python:
os.environ["GS_SECRET_ACCESS_KEY"] = "your_access_key"
os.environ["GS_ACCESS_KEY_ID"] = "your_key_id"
Cheers,