EARTHENGINE_TOKEN error

#5
by OnFarmView - opened

Hi there,

I tried many times following the same instructions, but there is an error related to the EARTHENGINE_TOKEN.
I used CPU basic. is it a problem?

Details:

Network URL: http://10.19.35.97:8501
External URL: http://34.197.127.12:8501

To authorize access needed by Earth Engine, open the following URL in a web browser and follow the instructions. If the web browser does not start automatically, please manually browse the URL below.

https://code.earthengine.google.com/client-auth?scopes=https%3A//www.googleapis.com/auth/earthengine%20https%3A//www.googleapis.com/auth/devstorage.full_control&request_id=0r9KBPJhRK6IVKTNeF0Z6pQWMkmG9ilzs5EK7pkWHsg&tc=UXC7sZJVV9Ia1m9SG4zCJd7-dZfab1pueu5UmSrWxo8&cc=9Ue2by1L2fdyvIWBscHF91HPluNgZDJCawONP7BELUU

The authorization workflow will generate a code, which you should paste in the box below.
2023-12-02 10:13:14.349 Uncaught app exception
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/geemap/common.py", line 128, in ee_initialize
ee.Initialize(**kwargs)
File "/home/user/.local/lib/python3.10/site-packages/ee/_utils.py", line 39, in wrapper
return func(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/ee/init.py", line 137, in Initialize
data.initialize(
File "/home/user/.local/lib/python3.10/site-packages/ee/data.py", line 224, in initialize
_install_cloud_api_resource()
File "/home/user/.local/lib/python3.10/site-packages/ee/data.py", line 289, in _install_cloud_api_resource
_cloud_api_resource = _cloud_api_utils.build_cloud_resource(
File "/home/user/.local/lib/python3.10/site-packages/ee/_cloud_api_utils.py", line 195, in build_cloud_resource
resource = build(static_discovery=False)
File "/home/user/.local/lib/python3.10/site-packages/ee/_cloud_api_utils.py", line 179, in build
return discovery.build(
File "/home/user/.local/lib/python3.10/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/googleapiclient/discovery.py", line 287, in build
content = _retrieve_discovery_doc(
File "/home/user/.local/lib/python3.10/site-packages/googleapiclient/discovery.py", line 422, in _retrieve_discovery_doc
resp, content = req.execute(num_retries=num_retries)
File "/home/user/.local/lib/python3.10/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/googleapiclient/http.py", line 923, in execute
resp, content = _retry_request(
File "/home/user/.local/lib/python3.10/site-packages/googleapiclient/http.py", line 191, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/google_auth_httplib2.py", line 209, in request
self.credentials.before_request(self._request, method, uri, request_headers)
File "/home/user/.local/lib/python3.10/site-packages/google/auth/credentials.py", line 175, in before_request
self.refresh(request)
File "/home/user/.local/lib/python3.10/site-packages/google/oauth2/credentials.py", line 345, in refresh
) = reauth.refresh_grant(
File "/home/user/.local/lib/python3.10/site-packages/google/oauth2/reauth.py", line 365, in refresh_grant
_client._handle_error_response(response_data, retryable_error)
File "/home/user/.local/lib/python3.10/site-packages/google/oauth2/_client.py", line 72, in _handle_error_response
raise exceptions.RefreshError(
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/home/user/app/app.py", line 62, in
m = geemap.Map(
File "/home/user/.local/lib/python3.10/site-packages/geemap/foliumap.py", line 55, in init
ee_initialize()
File "/home/user/.local/lib/python3.10/site-packages/geemap/common.py", line 131, in ee_initialize
ee.Authenticate(**auth_args)
File "/home/user/.local/lib/python3.10/site-packages/ee/init.py", line 105, in Authenticate
oauth.authenticate(
File "/home/user/.local/lib/python3.10/site-packages/ee/oauth.py", line 430, in authenticate
flow.save_code()
File "/home/user/.local/lib/python3.10/site-packages/ee/oauth.py", line 479, in save_code
_obtain_and_write_token(code, self.code_verifier, self.scopes, redirect_uri)
File "/home/user/.local/lib/python3.10/site-packages/ee/oauth.py", line 188, in _obtain_and_write_token
auth_code = input('Enter verification code: ')
EOFError: EOF when reading a line

Cheers,
Thai

Sign up or log in to comment