Closed FelixTheAwesomeCat closed 3 years ago
Strange, maybe some firewall issues. You need to run earthengine authenticate
in the Windows CMD? Not in QGIS. Install python, then pip install earthengine-api
, and then earthengine authenticate
, as mentioned in FAQ.
@XavierCLL, do you have ide what could it be?
I tried on another PC, also QGIS 3.16.4 same Problem! I did what u told me, it worked, however if I try this code in qgis console:
import ee print(ee.String('Hello World from EE!').getInfo())
i get this error:
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 "", line 1, in
File "C:\Users\Vera\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\Vera\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\Vera\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\Vera\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\apifunction.py", line 183, in importApi cls.initialize() File "C:\Users\Vera\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\Vera\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'
So it is not working, right?
No, something is not initialized or not installed. You're trying with the latest version of QGIS EE plugin 0.0.3, right? Can you try to reinstall it in QGIS?
If you login to http://code.earthengine.google.com, everything works without any problem, right?
After running earthengine authenticate
in the windows terminal, can you try to run the same code as above in a normal python (not in QGIS), does it work?
Hi @gena and @FelixTheAwesomeCat that is exactly what I was discussing in #91 could you please test this package with the latest commits: https://drive.google.com/file/d/1x8QCQ-5CzjQEk-cNEyMU87Xz5S8LaR7s/view?usp=drivesdk
I tried it with a clean qgis, latest stable (3.16.4) and a new pc. Same problem. Import ee doesn't work on my python. The Earthengine commands work.
So, earthengine ls
runs without problems? And also you can reach the EE Code Editor fine in a web browser?
If EE scripts do not work under Python - I'd first try to figure out why (this has nothing to do with the QGIS or QGIS EE, but more with your python environment and/or libraries, paths, firewall).
You can also check/ask on https://github.com/google/earthengine-api/issues.
@XavierCLL your version worked fine!
@gena earthengine ls does nothing but i dont get an error ether. I can reach the web editor just fine.
@XavierCLL , hmm, I thought this was released with 0.0.3.
Good idea release a minor release with these changes
Yes, we should probably make a minor next release to have this fixed
Thanks for the fast help!
@FelixTheAwesomeCat thanks for reported and tested it, fixed with #91
@XavierCLL, check PR #93, this adds a small backwards-compatibility fix as well (prevents crashing with older QGIS EE projects)
Hello, when I install the plugin, no authentication window appears. I tried it with 'earthengine authenticate' but then this error appears:
Other codes work like import ee or ee.Initialize(). I tried to install the plugin on a clean QGIS, on different QGIS versions (3.10.13 and 3.16.4) and on differnet PCs. Same problem. I cant get to the authentication window that should appear normally.
Thanks for your help!