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

Authentication Error #63

Closed
udithagis opened this issue Jul 7, 2020 · 1 comment · Fixed by #64
Closed

Authentication Error #63

udithagis opened this issue Jul 7, 2020 · 1 comment · Fixed by #64
Assignees

Comments

@udithagis
Copy link

Couldn't load plugin 'ee_plugin' due to an error when calling its classFactory() method

TypeError: get_authorization_url() missing 1 required positional argument: 'code_challenge'
Traceback (most recent call last):
File "C:\Users\udith\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 230, in get_persistent_credentials
tokens = json.load(open(oauth.get_credentials_path()))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\udith/.config/earthengine/credentials'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_auth.py", line 19, in init
ee.Initialize()
File "C:\Users\udith\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee_init_.py", line 114, in Initialize
credentials = data.get_persistent_credentials()
File "C:\Users\udith\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 241, in get_persistent_credentials
'Please authorize access to your Earth Engine account by '
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/QGIS31.14/apps/qgis/./python\qgis\utils.py", line 334, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin_init
.py", line 25, in classFactory
from .ee_plugin import GoogleEarthEnginePlugin
File "C:/PROGRA1/QGIS31.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_plugin.py", line 26, in
ee_plugin.ee_auth.init()
File "C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_auth.py", line 21, in init
authenticate()
File "C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_auth.py", line 32, in authenticate
auth_url = ee.oauth.get_authorization_url()
TypeError: get_authorization_url() missing 1 required positional argument: 'code_challenge'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.14.0-Pi Pi, 9f7028fd23

Python Path:
C:/PROGRA1/QGIS31.14/apps/qgis/./python
C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA1/QGIS31.14/apps/qgis/./python/plugins
C:\PROGRA1\QGIS31.14\apps\Python37
C:\PROGRA1\QGIS31.14\apps\Python37\Scripts
C:\Program Files\QGIS 3.14\bin\python37.zip
C:\PROGRA1\QGIS31.14\apps\Python37\DLLs
C:\PROGRA1\QGIS31.14\apps\Python37\lib
C:\Program Files\QGIS 3.14\bin
C:\PROGRA1\QGIS31.14\apps\Python37\lib\site-packages
C:\PROGRA1\QGIS31.14\apps\Python37\lib\site-packages\win32
C:\PROGRA1\QGIS31.14\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA1\QGIS31.14\apps\Python37\lib\site-packages\Pythonwin
C:/Users/udith/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\udith\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows

@spatialthoughts
Copy link

I had the same issue with QGIS 3.14 and fixed by running earthengine authenticate. See https://github.com/gee-community/qgis-earthengine-plugin#faq

XavierCLL added a commit that referenced this issue Jul 27, 2020
…e auth_code only works with GEE verifier, fix issue #63
@XavierCLL XavierCLL self-assigned this Jul 29, 2020
@XavierCLL XavierCLL mentioned this issue Nov 4, 2020
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

Successfully merging a pull request may close this issue.

3 participants