-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Problem with ee Authenticate #1870
Comments
I can confirm that |
Since earthengine-api v0.1.383, users need to specify the project id for ee.Initialize(project='my-project-id') |
Hi @giswqs ee.Authenticate(auth_mode='localhost')
ee.Initialize() |
This bug has been fixed. Run |
Running the following code should authenticate and initialize ee automatically. No need to run import geemap
m = geemap.Map()
m |
@jdbcode @naschmitz @schwehr Note that |
Thank you so much! |
Noted, we're looking, thanks for notifying! |
For those that are trying to |
Also note that |
Nice! Thanks also for adding the However, I think the need for a project in initialization is also causing problems. Testing from Colab: (I made sure that it is not accessing stored credentials - deleted them temporarily)
I don't think it's initializing successfully and not showing the init error in stack trace. |
Issue tracker for |
I can confirm that the colab auth is broken for geemap. Looking into it now. |
Here is the workaround right now. I think the requirement for specifying a cloud project explicitly is a barrier for Python users. Most ee Python users probably only has one cloud project under their account, with default name like import geemap
geemap.ee_initialize(project='<your-project-id>')
m = geemap.Map()
m |
The requirement for specifying a project-id will break all python examples in the documentation. Colab users will have to do one of the following to authenticate and initialize a session. It would be much easier if import ee
import geemap
ee.Authenticate(auto_mode='colab')
ee.Iinitialize(project='<your-project-id>')
m = geemap.Map()
m import geemap
geemap.ee_initialize(project='<your-project-id>')
m = geemap.Map()
m https://developers.google.com/earth-engine/guides/image_visualization#colab-python |
@jdbcode Do you know what is the Python eqivalent to |
The However, |
If you are running locally though you might do auth and project setting through the command line once to save the credentials and then you only need to call
|
@giswqs - I agree, for a large group of users, having to specify a project in What I'd really like are for people to be able to access the Colab secrets through an API that allows a person to write for example earth engine credentials with the default project as an attribute. (so people don't have to run it in the command line locally and then copy/paste into colab) - then they should only have to |
@jdbcode I was thinking about having about a environment variable (e.g., |
Update the package using import ee
import geemap
ee.Authenticate()
ee.Initialize(project='YOUR-PROJECT-ID')
m = geemap.Map()
m |
giswqs Merci énormément ca marche maintenant . |
Environment Information
I run the following code under google Colab on Chrome navigator.
Description
I was trying to run a Colab notebook, that worked without issues previously one day ago, and I can not authentificate as I get the following error when I click on the "Generate token"
I also tried to run pip install pygis but had the same issue.
A similar issue has been reported very recently under the "Discussions" tab from another user who have the same error but run the code through JupyterLab.
What I Did
The text was updated successfully, but these errors were encountered: