gee-community / qgis-earthengine-plugin

Integrates Google Earth Engine and QGIS using Python API
http://qgis-ee-plugin.appspot.com
MIT License
437 stars 113 forks source link

Authorization error and http ERR_EMPTY_RESPONSE #118

Open edgar89 opened 1 year ago

edgar89 commented 1 year ago

Hello, I'm using QGIS 3.22.10 and I recently updated to v.0.0.5 of the qgis-earthengine-plugin in order to get rid of #115

However, every time I open one of my file which references google earth maps I got the following message:

image

I click on "ok", the browser opens and I follow the google oauth mechanism up to "consent". At this point the oauth redirect happens and the browser moves to http://localhost:8085 displaying the ERR_EMPTY_RESPONSE message.

At the same time on qgis an error appears with the python error stacktrace reported below (sensitive data omitted) and I guess this "server error" is what causes the EMPTY_RESPONSE but I'm struggling to understand what is possibly going on

Things I tried:

Please let me know if you need anything on my side

ERROR MESSAGE

Si è verificato un errore durante l'esecuzione del codice Python: 

ee.ee_exception.EEException: Not signed up for Earth Engine or project is not registered. Visit https://earthengine.google.com/faq/ 
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 328, 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 134, 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 915, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: 

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 137, 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 1071, 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 330, 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://earthengine.google.com/faq/

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 328, 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 134, 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 915, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: 

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\ee_plugin.py", line 125, in updateLayers
    import ee
  File "C:\Users/XXX/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\XXX\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\__init__.py", line 137, 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 1071, 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 330, 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://earthengine.google.com/faq/

Versione Python: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
Versione di QGIS: 3.22.10-Białowieża Białowieża, 6a63fd37 

Percorso Python:
C:/PROGRA~1/QGIS32~1.10/apps/qgis-ltr/./python
C:/Users/XXX/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/XXX/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS32~1.10/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.22.10\bin\python39.zip
C:\PROGRA~1\QGIS32~1.10\apps\Python39\DLLs
C:\PROGRA~1\QGIS32~1.10\apps\Python39\lib
C:\Program Files\QGIS 3.22.10\bin
C:\PROGRA~1\QGIS32~1.10\apps\Python39
C:\PROGRA~1\QGIS32~1.10\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS32~1.10\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS32~1.10\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS32~1.10\apps\Python39\lib\site-packages\Pythonwin
C:/Users/XXX/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\XXX\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows
E:/Documenti-2019/full-path-to-project-folder
gena commented 1 year ago

It might be some conflict in the python installations. You can try manually deleting ~/.config/earthengine/credentials and then run and follow the instructions:

earthengine authenticate  --quiet

Also, for 3.22 try the v0.0.6, it has an important bug fixed related to the identify tool.