Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issue with Geemap API Key Error in Version 0.34.03 #382

Open
PrashanthReddy47 opened this issue Dec 29, 2024 · 0 comments
Open

Issue with Geemap API Key Error in Version 0.34.03 #382

PrashanthReddy47 opened this issue Dec 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@PrashanthReddy47
Copy link

Description:
I encountered a RuntimeError while trying to initialize geemap.Map() in Geemap version 0.34.03. The issue seems related to the Google Maps API key validation, even when no explicit API key is provided.

Steps to Reproduce:

import geemap
import ee

ee.Initialize()
Map = geemap.Map()  # No API key passed

Error Message:

RuntimeError: Error creating a Maps API session:
{'error': {'code': 400, 'message': 'API key not valid. Please pass a valid API key.'}}

Expected Behavior:
Geemap should initialize the Map() object without requiring an API key when using default basemaps.

Observed Behavior:
Geemap attempts to validate a Google Maps API key, even when no key is explicitly provided, resulting in a failure due to invalid or missing API credentials.

Additional Context:
A similar issue was reported earlier (#342) and fixed in October with version 0.12.1. However, it seems to have resurfaced in 0.34.03.

Environment:

  • OS: Windows 11
  • Python version: 3.8.10
  • Geemap version: 0.34.03
  • Earth Engine version: 1.1.4

Temporary Workaround:
Setting os.environ["GOOGLE_MAPS_API_KEY"] = "" as an empty string prevents the error, but this should not be required for the default basemaps.

Request:
Please investigate this regression and ensure that the fix from #342 is applied consistently across recent versions.

@PrashanthReddy47 PrashanthReddy47 added the bug Something isn't working label Dec 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant