-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Project Selection: Replace text input with a project selection dropdown #166
Comments
I spent some time working through this but have been unable to retrieve a list of projects for a given set of credentials. After authenticating, I've been trying the following: from googleapiclient import discovery
from ee.data import get_persistent_credentials
credentials = get_persistent_credentials()
service = discovery.build("cloudresourcemanager", "v1", credentials=credentials)
request = service.projects().list()
while request is not None:
response = request.execute()
for project in response.get("projects", []):
print(f'{project["projectId"]=}')
request = service.projects().list_next(
previous_request=request, previous_response=response
) However, this yields the following error:
The project Unless an administrator of the OAuth client for the earthengine API is willing/capable of updating the client configuration to enable the cloud resource manager API, I don't think we can make such a query. I will note that I don't think scopes are a factor regarding this issue, as the default scopes used includes |
@naschmitz for awareness. RE project listing and selection. |
This is something the Earth Engine Python team is thinking about as well.
I'm unable to reproduce the issue you're seeing, but I have a couple ideas for fixes:
I'm happy to dig into this problem more later in the week. Let me know whether the suggestions worked. |
The current project selection workflow in the plugin requires users to manually input a Google Cloud project name as a text string. This input is then sent to Earth Engine (EE) without any validation, which can lead to errors if the project name is misspelled or unregistered for Earth Engine access.
To improve the user experience, the plugin should allow users to select a Google Cloud project from a dropdown list, similar to how the Earth Engine Code Editor handles project selection. The dropdown should fetch and display only active projects associated with the user’s account.
Related links:
The text was updated successfully, but these errors were encountered: