ERROR: gcloud crashed (ConnectionError): SOCKSHTTPSConnectionPool(host='accounts.google.com', port=443): Max retries exceeded with url: /o/oauth2/token (Caused by NewConnectionError('<urllib3.contrib.socks.SOCKSHTTPSConnection object at 0x000001B3C53097C0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝
,无法连接。'))
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
Traceback (most recent call last):
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee\oauth.py", line 317, in _load_app_default_credentials
subprocess.run(command, check=True)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\Users\HXH\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.CMD', 'auth', 'application-default', 'login', '--scopes=https://www.googleapis.com/auth/earthengine,https://www.googleapis.com/auth/devstorage.full_control', '--client-id-file=C:\Users\HXH/.config/earthengine/credentials-client-id.json']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\HXH\AppData\Roaming\Python\Python39\Scripts\earthengine.exe_main.py", line 7, in
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee\cli\eecli.py", line 87, in main
_run_command()
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee\cli\eecli.py", line 61, in run_command
dispatcher.run(args, config)
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee\cli\commands.py", line 369, in run
self.command_dict[vars(args)[self.dest]].run(args, config)
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee\cli\commands.py", line 414, in run
ee.Authenticate(**args_auth)
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee_init.py", line 103, in Authenticate
return oauth.authenticate(authorization_code, quiet, code_verifier, auth_mode,
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee\oauth.py", line 422, in authenticate
_load_app_default_credentials(auth_mode == 'gcloud', scopes, quiet)
File "C:\Users\HXH\AppData\Roaming\Python\Python39\site-packages\ee\oauth.py", line 327, in _load_app_default_credentials
raise Exception('gcloud failed. ' + tip) from e # pylint:disable=broad-exception-raised
Exception: gcloud failed. Please check for any errors above.
*Possible fixes: If you loaded a page with a "redirect_uri_mismatch" error, run earthengine authenticate with the --quiet flag; if the error page says "invalid_request", be sure to run the entire gcloud auth command that is
shown.
More information: https://developers.google.com/earth-engine/guides/python_install