geemap: Problem with ee Authenticate

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”

error_geemap

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

import ee
ee.Authenticate()

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 21 (13 by maintainers)

Most upvoted comments

Since earthengine-api v0.1.383, users need to specify the project id for ee.Initialize(), which is an extra barrier for ee Python users. Most Python users only have one cloud project (the default cloud project). It would be great if ee.Initialize() can use the default cloud project under the user’ account so that users don’t have to specify the project id explicitly. It makes more sense to specify a project id only when a user has multiple cloud projects. Otherwise, the breaks most exsiting ee Python code.

ee.Initialize(project='my-project-id')

@jdbcode I was thinking about having about a environment variable (e.g., EE_PROJECT_ID) that can be accessed in Colab secrets. We can implement it in geemap before Colab officially supports it.

This bug has been fixed. Run pip install -U geemap and restart the kernel to take effect.