添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

After installing the gcloud SDK, I ran the following command and got a "ERROR: gcloud command not found. Please ensure that gcloud is installed."error.
import ee ee.Authenticate() service_account = '[email protected]' credentials = ee.ServiceAccountCredentials(service_account, './my-project-1111cceb213b.json') ee.Initialize(credentials)
When I comment out "ee.Authenticate()" and run print(ee.String('Hello World from EE!').getInfo()) , I got "ee.ee_exception.EEException: Project 'projects/xxx' not found or deleted."
but the same code works in python geemap, I'm confused where the problem is.
(windows11 QGIS3.34.5 Python 3.9 Google Earth Engine 0.0.6)

Hi @haoweiduan

This is a new requirement in the GEE API, you need to run ee.Initialize(project=my-project) with a project, check this related issue #143
I have tried
ee.Authenticate() ee.Initialize(project='my-project')
but I got "ee.ee_exception.EEException: Not signed up for Earth Engine or project is not registered."

When I executed the code, I replaced my project name with “my-project”
console shows "QGIS EE Plugin authenticated successfully". But then the following error message was displayed:
raceback (most recent call last):
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 326, in _execute_cloud_call
return call.execute(num_retries=num_retries)
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient\http.py", line 938, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/algorithms?prettyPrint=false&alt=json returned "Not signed up for Earth Engine or project is not registered. Visit https://developers.google.com/earth-engine/guides/access ". Details: "Not signed up for Earth Engine or project is not registered. Visit https://developers.google.com/earth-engine/guides/access">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin_ init _.py", line 42, in wrapping_ee_import
module .Initialize(http_transport=httplib2.Http())
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee_ init _.py", line 140, in Initialize
ApiFunction.initialize()
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\apifunction.py", line 154, in initialize
signatures = data.getAlgorithms()
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 1128, in getAlgorithms
return _cloud_api_utils.convert_algorithms(_execute_cloud_call(call))
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 328, in _execute_cloud_call
raise _translate_cloud_exception(e)
ee.ee_exception.EEException: Not signed up for Earth Engine or project is not registered. Visit https://developers.google.com/earth-engine/guides/access

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 326, in _execute_cloud_call
return call.execute(num_retries=num_retries)
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\xxx\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient\http.py", line 938, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/algorithms?prettyPrint=false&alt=json returned "Not signed up for Earth Engine or project is not registered. Visit https://developers.google.com/earth-engine/guides/access ". Details: "Not signed up for Earth Engine or project is not registered. Visit https://developers.google.com/earth-engine/guides/access">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\QGIS\apps\Python39\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
File "", line 4, in
File "C:\Users/duanhaowei/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin_ init _.py", line 46, in wrapping_ee_import
module .Initialize(http_transport=httplib2.Http())
File "C:\Users\duanhaowei\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee_ init _.py", line 140, in Initialize
ApiFunction.initialize()
File "C:\Users\duanhaowei\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\apifunction.py", line 154, in initialize
signatures = data.getAlgorithms()
File "C:\Users\duanhaowei\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 1128, in getAlgorithms
return _cloud_api_utils.convert_algorithms(_execute_cloud_call(call))
File "C:\Users\duanhaowei\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 328, in _execute_cloud_call
raise _translate_cloud_exception(e)
ee.ee_exception.EEException: Not signed up for Earth Engine or project is not registered. Visit https://developers.google.com/earth-engine/guides/access

I think I fixed it but we have not released it yet, please reinstall the plugin using the artifact described in #133 (comment)

Please let me know if that fixes your error

I think I fixed it but we have not released it yet, please reinstall the plugin using the artifact described in #133 (comment)

Please let me know if that fixes your error

I have reinstalled the plugin,when I import ee
a new error message was displayed :
Traceback(most recent call last): File "D:\QGIS\apps\Python39\lib\code.py", line 90, in runcode exec(code, self.locals) File "<input>", line 1, in <module> File "<string>", line 4, in <module> File "D:\QGIS/apps/qgis-ltr/./python\qgis\utils.py", line 892, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'ee'

I have reinstall

@haoweiduan The solution is waiting in a PR, meanwhile the easiest method is open the zip, change the directory name "extlibs_linux" to "extlibs_windows", zip it again and install it

It works, that's cool. Thanks a lot!