gee-community / qgis-earthengine-plugin

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

plugin installation error #90

Closed d3netxer closed 3 years ago

d3netxer commented 3 years ago

I installed the plug-in. After the plug-in installed it did not ask me authenticate, so I am assuming I am already authenticated. But then again, I am not sure why it did not ask me. Anyways, I then try to test if the plugin is installed and authenticated properly as it says in the instructions:

>>> import ee
>>> print(ee.String('Hello World from EE!').getInfo())
Hello World from EE!

However, I get the following error:

print(ee.String('Hello World from EE!').getInfo())
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.16\apps\Python37\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "C:\Users\war-machine\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\computedobject.py", line 32, in __call__
    return type.__call__(cls, *args, **kwargs)
  File "C:\Users\war-machine\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\ee_string.py", line 32, in __init__
    self.initialize()
  File "C:\Users\war-machine\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\ee_string.py", line 53, in initialize
    apifunction.ApiFunction.importApi(cls, 'String', 'String')
  File "C:\Users\war-machine\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\apifunction.py", line 183, in importApi
    cls.initialize()
  File "C:\Users\war-machine\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\war-machine\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 1042, in getAlgorithms
    call = _cloud_api_resource.projects().algorithms().list(
AttributeError: 'NoneType' object has no attribute 'projects'
d3netxer commented 3 years ago

I figured this out, it was an authentication issue. I had to install the Google Earth Engine command line tool, and then run the 'earthengine authenticate' from the command line. Can you please add this information to your page? https://gee-community.github.io/qgis-earthengine-plugin/

XavierCLL commented 3 years ago

Hi @d3netxer, thanks for your report, and yes we need to improve the documentation. On the other hand, your report made me realize a problem in the authentication init function in the plugin, I'll fix it in the following days.

gena commented 3 years ago

@d3netxer, the page is extended with a FAQ section where additional instructions are provided on how to authenticate using CLI. This was on the GitHub readme but not on the page. Hopefully, this will help others who face the same issue.

XavierCLL commented 3 years ago

Fixed in #91