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

Authentication Problems. Help needed #122

Closed rtaani closed 1 year ago

rtaani commented 1 year ago

Hello! I'm using QGIS 3.22.0 (Bialowieza). I'm trying to work with the GHSL-S2 plugin. As far as my research goes, it is important to install the plugin Google Earth Engine. I have an active account with google Earth Engine and I'm following the instruction to import it into QGIS with (https://ghsl.jrc.ec.europa.eu/documents/GHSL_S2_plugin_User_Guide.pdf?rnd=0.6892737559974194). However, when I try to import Earth Engine in QGIS I always get the same error message. Meanwhile, ob the webpage I get the message that the authentification was a success.

import ee Starting Google Earth Engine Authorization ... 127.0.0.1 - - [11/Nov/2022 15:51:01] "GET /?code=4/0AfgeXvtQoAm0vILGA3qm7sE41n7YcmvCBO_mMdNVcJ44vAuIvJySSQ5_63DC5OCDzcjrkA&scope=https://www.googleapis.com/auth/earthengine%20https://www.googleapis.com/auth/devstorage.full_control%20https://www.googleapis.com/auth/accounts.reauth HTTP/1.1" 200 - Traceback (most recent call last): File "C:\Users\Taani\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 221, in get_persistent_credentials return Credentials(None, **oauth.get_credentials_arguments()) File "C:\Users\Taani\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\oauth.py", line 68, in get_credentials_arguments with open(get_credentials_path()) as creds: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Taani/.config/earthengine/credentials'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users/Taani/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugininit.py", line 42, in wrapping_ee_import module.Initialize(http_transport=httplib2.Http()) File "C:\Users\Taani\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\eeinit.py", line 127, in Initialize credentials = data.get_persistent_credentials() File "C:\Users\Taani\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 223, in get_persistent_credentials raise ee_exception.EEException( ee.ee_exception.EEException: Please authorize access to your Earth Engine account by running

earthengine authenticate

in your command line, and then retry.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\urllib\request.py", line 1346, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\http\client.py", line 1253, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\http\client.py", line 1299, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\http\client.py", line 1248, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\http\client.py", line 1008, in _send_output self.send(msg) File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\http\client.py", line 948, in send self.connect() File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\http\client.py", line 1415, in connect super().connect() File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\http\client.py", line 919, in connect self.sock = self._create_connection( File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\socket.py", line 822, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\socket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in File "C:\Users/Taani/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugininit.py", line 44, in wrapping_ee_import if authenticate(ee=module): File "C:\Users/Taani/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_auth.py", line 84, in authenticate response = urllib.request.urlopen(ee.oauth.TOKEN_URI, data).read().decode() File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\urllib\request.py", line 214, in urlopen return opener.open(url, data, timeout) File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\urllib\request.py", line 517, in open response = self._open(req, data) File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\urllib\request.py", line 534, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\urllib\request.py", line 494, in _call_chain result = func(*args) File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\urllib\request.py", line 1389, in https_open return self.do_open(http.client.HTTPSConnection, req, File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\urllib\request.py", line 1349, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed> I dont have much experience with python or command lines, I'm finding it hard to understand how I can get earth engine to work. I only need to to use GHSL.

I have installed Idle Shell in Order to authenticate GEE, however with no success. I'm having trouble finding online any kind of tutorial, and since I havent used Python much, I cannot deduce how to solve my problem.

Is there another way to have GEE-Plugin function in QGIS?

Many thanks in Advance

XavierCLL commented 1 year ago

Hi @rtaani

Are you behind a proxy? have you tried using the command line client? check the faq for the instructions: https://github.com/gee-community/qgis-earthengine-plugin#faq

Xavier

gena commented 1 year ago

Closed for no activity