Skip to content

AttributeError: module 'ee.data' has no attribute '_credentials' #618

@vergauwenthomas

Description

@vergauwenthomas

Since very recent, this error with traceback appears;


File ~/Documents/VLINDER_github/MetObs_toolkit/src/metobs_toolkit/dataset.py:1504, in Dataset.get_static_gee_point_data(self, gee_static_manager, update_metadata, initialize_gee)
   1499     raise TypeError(
   1500         "gee_static_manager must be a GEEStaticDatasetManager instance."
   1501     )
   1503 if initialize_gee:
-> [1504](https://file+.vscode-resource.vscode-cdn.net/home/thoverga/Documents/VLINDER_github/MetObs_toolkit/~/Documents/VLINDER_github/MetObs_toolkit/src/metobs_toolkit/dataset.py:1504)     connect_to_gee()
   1506 geedf = gee_static_manager.extract_static_point_data(self.metadf)
   1508 varname = gee_static_manager.name

File ~/Documents/VLINDER_github/MetObs_toolkit/src/metobs_toolkit/backend_collection/decorators.py:11, in log_entry.<locals>.wrapper(*args, **kwargs)
      8 @wraps(func)
      9 def wrapper(*args, **kwargs):
     10     logger.debug(f"Entering {func.__name__}() in {func.__code__.co_filename}")
---> [11](https://file+.vscode-resource.vscode-cdn.net/home/thoverga/Documents/VLINDER_github/MetObs_toolkit/~/Documents/VLINDER_github/MetObs_toolkit/src/metobs_toolkit/backend_collection/decorators.py:11)     return func(*args, **kwargs)

File ~/Documents/VLINDER_github/MetObs_toolkit/src/metobs_toolkit/gee_api.py:95, in connect_to_gee(**kwargs)
     91     logger.warning(f"Failed to initialize GEE with default credentials: {e}")
     92     # Fall through to authentication
     93 
     94 # If initialization failed, try to authenticate
---> [95](https://file+.vscode-resource.vscode-cdn.net/home/thoverga/Documents/VLINDER_github/MetObs_toolkit/~/Documents/VLINDER_github/MetObs_toolkit/src/metobs_toolkit/gee_api.py:95) if not ee.data._credentials:
     96     ee.Authenticate()
     97     ee.Initialize()

AttributeError: module 'ee.data' has no attribute '_credentials'

This appears when no credentials are (locally) stored. This bug appears since the _credentials attribute was removed in the gee api.

Metadata

Metadata

Labels

PriorityThis issue has prioritybugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions