Skip to content
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

Error: Not signed up for Earth Engine or project is not registered #143

Open
colemanjj opened this issue Mar 31, 2024 · 8 comments
Open

Comments

@colemanjj
Copy link

After installing the qgis-earthengine-plugin I registered for the Google Earth Engine through the web interface and created a new project. That all worked fine.
But in QGIS, in the python console I got the error: "Not signed up for Earth Engine or project is not registered" repeatedly if I did the following commands:

import ee
print(ee.String('Hello World from EE!').getInfo())
or
import ee
ee.Initialize()
or if I tried to use the other plugins like "Google earth Engine Data Catalog"

However the problem was solved if I entered the following commands in the Python console:

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

I'm not sure if this is a problem with my installation (Windows 10, Qgis 36.1, python 3.9) or something else but I spent 6-8 hours trying to figure this out. You might want to mention this solution in your documentation.

@XavierCLL
Copy link
Collaborator

@colemanjj

Yes, we are aware of that, initialize EE in a project will be mandatory in the near future but not now, and we are going to update some docs. But, I can run ee.Initialize() without a problem. It is weird that you have that issue right now. @colemanjj thanks for reporting it.

Info related:

@jdbcode
Copy link
Contributor

jdbcode commented Apr 1, 2024

If you run earthengine set_project my-project in your command prompt, it should add the given project as a default to the credentials file that is created and stored during the authentication step in plugin setup. If a project is added to the credentials file, you should not have to set the project when calling ee.Initialize(), unless you want to run the compute through a different project than the default you set.

Your credentials file is stored here (in case you want to inspect):

  • Windows: C:\Users<USER>.config\earthengine\credentials
  • Linux: /home//.config/earthengine/credentials
  • MacOS: /Users//.config/earthengine/credentials

@XavierCLL
Copy link
Collaborator

Thanks so much for the info @jdbcode! Do you know when it is mandatory to link the project in GEE credentials or in ee.Initialize()?

@jdbcode
Copy link
Contributor

jdbcode commented Apr 8, 2024

@XavierCLL we're encouraging everyone to use cloud projects now, if they can. A person can continue to not use a cloud project if they are authenticating with either the localhost or gcloud-legacy modes (https://developers.google.com/earth-engine/guides/auth#quick_reference_guide_and_table). As EE becomes more integrated into Google Cloud, it becomes increasingly difficult to support legacy (non-cloud) usage.

@XavierCLL
Copy link
Collaborator

@XavierCLL we're encouraging everyone to use cloud projects now, if they can. A person can continue to not use a cloud project if they are authenticating with either the localhost or gcloud-legacy modes (https://developers.google.com/earth-engine/guides/auth#quick_reference_guide_and_table). As EE becomes more integrated into Google Cloud, it becomes increasingly difficult to support legacy (non-cloud) usage.

Thanks so much Justin for the information!

@PietroCiccale
Copy link

Hi, since this issue is still opened I'm going to write this here. I tried everything in order to get GEE into QGIS, but it really became frustrating. All I did, I tried in two accounts with different projects. I registered my projects in google cloud and activated the GEE API. I installed the gcloud, I tried to set my project and my credentials manually within the prompt, I tried uninstall and reinstall QGIS and GEE plugin many times. I always get the error "Not signed up for Earth Engine or project is not registered", no matter the project nor account. the ee.Initialize(project='my-project') also does not work since the error falls on the first row for the python plugin in QGIS(Figure 1): import ee. In command prompt everything looks fine (Figure 2). Any clues?
Figure 1
image
Figure 2
image

@XavierCLL
Copy link
Collaborator

Hi @PietroCiccale

The complete integration of using GEE project in the plugin is still a work in progress, but for now you can use this #133 (comment) update to initialize the project as you show in the figure 2, let me know if with that works for you.

@PietroCiccale
Copy link

Hi @PietroCiccale

The complete integration of using GEE project in the plugin is still a work in progress, but for now you can use this #133 (comment) update to initialize the project as you show in the figure 2, let me know if with that works for you.

This finally worked, thank you so much Xavier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants