-
|
Hello, I'm trying to convert an image collection to Xarray and i have this error message : ---------------------------------------------------------------------------
EEException Traceback (most recent call last)
[/tmp/ipython-input-4066575193.py](https://localhost:8080/#) in <cell line: 0>()
----> 1 ds = geemap.ee_to_xarray(s2, crs='36629', geometry=FN_centre)
2 ds
2 frames
[/usr/local/lib/python3.12/dist-packages/ee/__init__.py](https://localhost:8080/#) in Initialize(credentials, url, cloud_api_key, http_transport, project)
199 empty_project_ok = isinstance(credentials, service_account.Credentials)
200 if not is_valid_project and not empty_project_ok:
--> 201 raise EEException(NO_PROJECT_EXCEPTION)
202
203 data.initialize(
EEException: ee.Initialize: no project found. Call with project= or see http://goo.gle/ee-auth.Note that I correctly initialized by using the correct project ID, I also use opt_url='https://earthengine-highvolume.googleapis.com' but even without using it I have the same result. Note that beside ee_to_array every other function from geemap works correctly. I have tried to initialize with both geemap.ee_initialize and ee.initialize. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
By default, # At beginning of session initialize to high volume endpoint.
ee.Authenticate() # if needed
ee.Initialize(
project='PROJECT-ID', # or credentials
opt_url='https://earthengine-highvolume.googleapis.com'
)
# Run the function.
geemap.ee_to_xarray(..., ee_initialize=False) |
Beta Was this translation helpful? Give feedback.
-
|
Fixed with #2333 |
Beta Was this translation helpful? Give feedback.
By default,
geemap.ee_to_xarrayreinitializes to the high volume endpoint. My guess is that the function was created before projects were required in theee.Initializecall, so it is complaining about not having a project. We'll need to refactoree_to_xarray. In the meantime, you can includeee_initialize=Falsein thegeemap.ee_to_xarraycall to use the initialization state that you set at the beginning of the session.