Comments (11)
Please inspect the file located in ~/.config/earthengine/credentials
. Does it have the following sections?
"client_id", "client_secret", "refresh_token", and "scopes"
If it doesn't have all these sections, it's likely that you authenticated to EE a long time ago, or with an older version of the earthengine-api
. It will still work for python, but I haven't figured out how to make it work for eetasks
. Try updating the earthengine-api python package, then re-authenticate through a Jupyter interactive window.
Regarding the EE Tasks: sign in
, what error did you encounter? This authentication flow is independent from the python one.
from eetasks.
I appreciate the quick responses.
I founded and inspected the file. It does not have any of the client sections (client_id and client_secret). How should I fix that?
Regarding EE Tasks: sign in
, I encounter the same error. When I choose that option, it prompts me to sign in through my browser. I do that and it all goes well. But I have the same problem when trying to run tasks or running any .js script.
from eetasks.
For the sign-in through the browser option, did you see a notification at the bottom-right such as the screenshot below?
Similarly, if you do the update available accounts command, do you see the "updated accounts" notification?
If you saw both, I would expect to see the "account picker" when you try to do the view tasks
or run a script (even if the credentials account doesn't work)
If not, then there is definitely a bug that we can investigate further.
To re-authenticate from python, try (1) updating the earthengine-api using pip or conda, (2) do ee.Authenticate(force=True)
from a Jupyter interactive window.. then check if the credentials file is now updated (you may want to do a backup of the file first, just in case).
from eetasks.
I see all of the images that you show. I just tried again both sign in options. When I try to view tasks, this is what I get:
Regarding the earthengine-api, I installed it just yesterday as a work around this issue.
I am not sure, but should I update manually the credentials file you told me above?
from eetasks.
No, I wouldn't recommend editing the file manually.
For the sign-in option, it looks like it will be necessary to specify a project as well but there isn't currently an option to do this, because I assumed it wasn't necessary for viewing tasks.. at least it hasn't been the case for me.
I'll investigate further
from eetasks.
@lopezvoliver thanks for checking! I notice that all of my python script require me to specify the project, so I trust this would be a necessary option for this extension.
Looking forward to your solution.
from eetasks.
@noejn2 there's actually another method you can try for now.
Use the EE tasks: set default account
. Select the account that you signed in through the browser, it should then prompt you for a project.
After this, try the EE tasks: view tasks (default account)
command.
Let me know if that works
from eetasks.
@lopezvoliver, that seems to solve the problem as the error message does not work. Thanks!
from eetasks.
@noejn2 for the credentials method, can you please try the following?
- Jupyter notebook or interactive window:
ee.Authenticate(force=True)
- Make sure that you select a project in this step and don't select the "read-only scopes":
- Select all here:
After this, your credentials
file should now be modified, and you should be able to use ee from your python scripts without having to specify the project (as you mentioned) -- at least that has been the case for me. If this works, then try again to do EE Tasks: update accounts
and then EE Tasks: view tasks
or EE Tasks: run GEE script
using the python account.
The
EE Tasks: run GEE script
always prompt you to select one of the available accounts (if you have more than one). I didn't include the "default account" option for this command. However, it does prompt you for a project each time, so you can try that as well.
from eetasks.
I was able to run scripts too (before I couldn't) and see tasks. I also checked credentials
, and the file has been updated.
However, I don't understand why when I run EE Tasks: run GEE script
I don't get the output of the task (a chart and a map, in this case). I am copying and pasting directly from the gee code editor.
This is a screenshot of what I get, which seems to me that it tells me the code has been ran, which usually takes about 10 seconds. Am I not understanding something?
from eetasks.
Charts and maps are not currently supported. Please note that the Run Gee script command from this extension is experimental. You can learn more here
https://github.com/gee-community/eetasks/blob/main/docs/runGEEscripts.md
Great to hear that the authentication worked after all, I'll close this issue now.
from eetasks.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eetasks.