DEBUG:openeo.config:Config file candidate: C:\Users\Sherif\openeo-client-config.ini DEBUG:openeo.config:Config file candidate: C:\Users\Sherif.openeo-client-config.ini INFO:openeo.config:Loaded openEO client config from sources: DEBUG:openeo.rest.connection:Request GET [https://openeo.cloud/.well-known/openeo
](https://openeo.cloud/.well-known/openeo`) with headers None, auth NullAuth, kwargs [‘stream’, ‘timeout’] DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openeo.cloud:443 DEBUG:urllib3.connectionpool:https://openeo.cloud:443 “GET /.well-known/openeo HTTP/1.1” 200 123 DEBUG:openeo.rest.connection:Got <Response [200]> headers {‘Server’: ‘nginx’, ‘Date’: ‘Thu, 02 Nov 2023 17:19:44 GMT’, ‘Content-Type’: ‘application/json’, ‘Content-Length’: ‘123’, ‘Last-Modified’: ‘Mon, 19 Jul 2021 12:42:40 GMT’, ‘Connection’: ‘keep-alive’, ‘ETag’: ‘“60f57340-7b”’, ‘Access-Control-Allow-Origin’: ‘', ‘Accept-Ranges’: ‘bytes’} DEBUG:openeo.rest.connection:Highest supported version available in backend: {‘url’: ‘https://openeocloud.vito.be/openeo/1.0.0/’, ‘api_version’: ‘1.0.0’} DEBUG:openeo.rest.connection:Request GET [https://openeocloud.vito.be/openeo/1.0.0/
](https://openeocloud.vito.be/openeo/1.0.0/`) with headers None, auth NullAuth, kwargs [‘stream’] DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openeocloud.vito.be:443 DEBUG:urllib3.connectionpool:https://openeocloud.vito.be:443 “GET /openeo/1.0.0/ HTTP/1.1” 200 3169 DEBUG:openeo.rest.connection:Got <Response [200]> headers {‘Date’: ‘Thu, 02 Nov 2023 17:23:09 GMT’, ‘Content-Type’: ‘application/json’, ‘Content-Length’: ‘3169’, ‘Connection’: ‘keep-alive’, ‘Cache-Control’: ‘max-age=900, public’, ‘Expires’: ‘Thu, 02 Nov 2023 17:38:09 GMT’, ‘Request-Id’: ‘r-0aa28ca2534c4bbf8050ef19ee42b769’, ‘Access-Control-Allow-Origin’: '’, ‘Access-Control-Expose-Headers’: ‘Accept-Ranges, Content-Encoding, Content-Range, Link, Location, OpenEO-Costs, OpenEO-Identifier’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubDomains’} DEBUG:openeo.rest.connection:Request GET [https://openeocloud.vito.be/openeo/1.0.0/credentials/oidc
](https://openeocloud.vito.be/openeo/1.0.0/credentials/oidc`) with headers None, auth NullAuth, kwargs [‘stream’] DEBUG:urllib3.connectionpool:https://openeocloud.vito.be:443 “GET /openeo/1.0.0/credentials/oidc HTTP/1.1” 200 453 DEBUG:openeo.rest.connection:Got <Response [200]> headers {‘Date’: ‘Thu, 02 Nov 2023 17:23:09 GMT’, ‘Content-Type’: ‘application/json’, ‘Content-Length’: ‘453’, ‘Connection’: ‘keep-alive’, ‘Cache-Control’: ‘max-age=900, public’, ‘Expires’: ‘Thu, 02 Nov 2023 17:38:09 GMT’, ‘Request-Id’: ‘r-9462b3c1418f4b7ab816b4374f8add06’, ‘Access-Control-Allow-Origin’: ‘*’, ‘Access-Control-Expose-Headers’: ‘Accept-Ranges, Content-Encoding, Content-Range, Link, Location, OpenEO-Costs, OpenEO-Identifier’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubDomains’} INFO:openeo.rest.connection:Found OIDC providers: [‘egi’] INFO:openeo.rest.connection:No OIDC provider given, but only one available: ‘egi’. Using that one. DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): aai.egi.eu:443 DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “GET /auth/realms/egi/.well-known/openid-configuration HTTP/1.1” 200 6169 DEBUG:openeo.rest.auth.oidc:Scopes: provider supported [‘openid’, ‘voperson_external_affiliation’, ‘email’, ‘orcid’, ‘aarc’, ‘cert_entitlement’, ‘eduperson_scoped_affiliation’, ‘voperson_id’, ‘ssh_public_key’, ‘profile’, ‘offline_access’, ‘eduperson_unique_id’, ‘eduperson_entitlement’] & backend desired [‘openid’, ‘email’, ‘eduperson_entitlement’, ‘eduperson_scoped_affiliation’] → {‘eduperson_scoped_affiliation’, ‘openid’, ‘email’, ‘eduperson_entitlement’} DEBUG:openeo.rest.connection:No client_id: checking config for preferred client_id INFO:openeo.config:Created user dir for ‘openeo-python-client’: C:\Users\Sherif\AppData\Roaming\openeo-python-client DEBUG:openeo.rest.connection:No client_id given: checking default clients in backend’s provider info INFO:openeo.rest.connection:Using default client_id ‘openeo-platform-default-client’ from OIDC provider ‘egi’ info. DEBUG:openeo.rest.auth.oidc:Using scopes: {‘eduperson_scoped_affiliation’, ‘openid’, ‘email’, ‘eduperson_entitlement’} DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): aai.egi.eu:443 DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “POST /auth/realms/egi/protocol/openid-connect/auth/device HTTP/1.1” 200 238 DEBUG:openeo.rest.auth.oidc:Verification info: VerificationInfo(verification_uri=‘Sign in to egi’, verification_uri_complete=‘Sign in to egi’, device_code=‘2H-A9TzrB30Gf0HX-9GOkzN76APwUPYwZRxTqW7Vkcc’, user_code=‘CMYT-XTYH’, interval=5) DEBUG:openeo.rest.auth.oidc:Start polling token endpoint (interval 5s)
Visit Sign in to egi to authenticate.
[################################-----]
Authorized successfully
DEBUG:openeo.rest.auth.oidc:Doing ‘urn:ietf:params:oauth:grant-type:device_code’ token request ‘https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token’ with post data fields [‘client_id’, ‘device_code’, ‘grant_type’, ‘code_verifier’] (client_id ‘openeo-platform-default-client’) DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “POST /auth/realms/egi/protocol/openid-connect/token HTTP/1.1” 400 98 INFO:openeo.rest.auth.oidc:[ 6.1s] not authorized yet: authorization_pending DEBUG:openeo.rest.auth.oidc:Doing ‘urn:ietf:params:oauth:grant-type:device_code’ token request ‘https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token’ with post data fields [‘client_id’, ‘device_code’, ‘grant_type’, ‘code_verifier’] (client_id ‘openeo-platform-default-client’) DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “POST /auth/realms/egi/protocol/openid-connect/token HTTP/1.1” 400 98 INFO:openeo.rest.auth.oidc:[ 12.2s] not authorized yet: authorization_pending DEBUG:openeo.rest.auth.oidc:Doing ‘urn:ietf:params:oauth:grant-type:device_code’ token request ‘https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token’ with post data fields [‘client_id’, ‘device_code’, ‘grant_type’, ‘code_verifier’] (client_id ‘openeo-platform-default-client’) DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “POST /auth/realms/egi/protocol/openid-connect/token HTTP/1.1” 400 98 INFO:openeo.rest.auth.oidc:[ 18.3s] not authorized yet: authorization_pending DEBUG:openeo.rest.auth.oidc:Doing ‘urn:ietf:params:oauth:grant-type:device_code’ token request ‘https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token’ with post data fields [‘client_id’, ‘device_code’, ‘grant_type’, ‘code_verifier’] (client_id ‘openeo-platform-default-client’) DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “POST /auth/realms/egi/protocol/openid-connect/token HTTP/1.1” 400 98 INFO:openeo.rest.auth.oidc:[ 24.4s] not authorized yet: authorization_pending DEBUG:openeo.rest.auth.oidc:Doing ‘urn:ietf:params:oauth:grant-type:device_code’ token request ‘https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token’ with post data fields [‘client_id’, ‘device_code’, ‘grant_type’, ‘code_verifier’] (client_id ‘openeo-platform-default-client’) DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “POST /auth/realms/egi/protocol/openid-connect/token HTTP/1.1” 400 98 INFO:openeo.rest.auth.oidc:[ 30.5s] not authorized yet: authorization_pending DEBUG:openeo.rest.auth.oidc:Doing ‘urn:ietf:params:oauth:grant-type:device_code’ token request ‘https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token’ with post data fields [‘client_id’, ‘device_code’, ‘grant_type’, ‘code_verifier’] (client_id ‘openeo-platform-default-client’) DEBUG:urllib3.connectionpool:https://aai.egi.eu:443 “POST /auth/realms/egi/protocol/openid-connect/token HTTP/1.1” 200 2468 INFO:openeo.rest.auth.oidc:[ 36.6s] Authorized successfully. INFO:openeo.rest.connection:Obtained tokens: [‘access_token’, ‘id_token’] DEBUG:openeo.rest.connection:Request GET [https://openeocloud.vito.be/openeo/1.0.0/collections/ESA_WORLDCEREAL_MAIZE
](https://openeocloud.vito.be/openeo/1.0.0/collections/ESA_WORLDCEREAL_MAIZE`) with headers None, auth OidcBearerAuth, kwargs [‘stream’] DEBUG:urllib3.connectionpool:https://openeocloud.vito.be:443 “GET /openeo/1.0.0/collections/ESA_WORLDCEREAL_MAIZE HTTP/1.1” 200 3294 DEBUG:openeo.rest.connection:Got <Response [200]> headers {‘Date’: ‘Thu, 02 Nov 2023 17:23:50 GMT’, ‘Content-Type’: ‘application/json’, ‘Content-Length’: ‘3294’, ‘Connection’: ‘keep-alive’, ‘Cache-Control’: ‘max-age=900, public’, ‘Expires’: ‘Thu, 02 Nov 2023 17:38:50 GMT’, ‘Request-Id’: ‘r-78f44506c7ec4cb9bbe2f1de3c42486e’, ‘Access-Control-Allow-Origin’: ‘', ‘Access-Control-Expose-Headers’: ‘Accept-Ranges, Content-Encoding, Content-Range, Link, Location, OpenEO-Costs, OpenEO-Identifier’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubDomains’} D:\10_programfiles\Anaconda\Lib\site-packages\openeo\metadata.py:325: UserWarning: Band name mismatch: [‘classification’, ‘confidence’] != [‘CLASSIFICATION’, ‘CONFIDENCE’] complain(“Band name mismatch: {a} != {b}”.format(a=cube_dimension_band_names, b=eo_band_names)) DEBUG:openeo.rest.connection:Request GET [https://openeocloud.vito.be/openeo/1.0.0/file_formats
](https://openeocloud.vito.be/openeo/1.0.0/file_formats`) with headers None, auth OidcBearerAuth, kwargs [‘stream’] DEBUG:urllib3.connectionpool:https://openeocloud.vito.be:443 “GET /openeo/1.0.0/file_formats HTTP/1.1” 200 5542 DEBUG:openeo.rest.connection:Got <Response [200]> headers {‘Date’: ‘Thu, 02 Nov 2023 17:23:50 GMT’, ‘Content-Type’: ‘application/json’, ‘Content-Length’: ‘5542’, ‘Connection’: ‘keep-alive’, ‘Cache-Control’: ‘max-age=900, public’, ‘Expires’: ‘Thu, 02 Nov 2023 17:38:50 GMT’, ‘Request-Id’: ‘r-9ae7602bcbfd4ceead811ae888fa307e’, ‘Access-Control-Allow-Origin’: '’, ‘Access-Control-Expose-Headers’: ‘Accept-Ranges, Content-Encoding, Content-Range, Link, Location, OpenEO-Costs, OpenEO-Identifier’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubDomains’} DEBUG:openeo.rest.connection:Request POST [https://openeocloud.vito.be/openeo/1.0.0/result
](https://openeocloud.vito.be/openeo/1.0.0/result`) with headers None, auth OidcBearerAuth, kwargs [‘json’, ‘allow_redirects’, ‘stream’, ‘timeout’] DEBUG:urllib3.connectionpool:https://openeocloud.vito.be:443 “POST /openeo/1.0.0/result HTTP/1.1” 500 169 DEBUG:openeo.rest.connection:Got <Response [500]> headers {‘Date’: ‘Thu, 02 Nov 2023 17:23:52 GMT’, ‘Content-Type’: ‘application/json’, ‘Content-Length’: ‘169’, ‘Connection’: ‘keep-alive’, ‘Access-Control-Allow-Origin’: ‘*’, ‘Access-Control-Expose-Headers’: ‘Accept-Ranges, Content-Encoding, Content-Range, Link, Location, OpenEO-Costs, OpenEO-Identifier’, ‘Request-Id’: ‘r-b8d047d75e644e829bf8bc210c6dd862’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubDomains’}
--------------------------------------------------------------------------- OpenEoApiError Traceback (most recent call last) Cell In[6], line 10 3 con.authenticate_oidc_device() 4 cube = con.load_collection( 5 “ESA_WORLDCEREAL_MAIZE”, 6 temporal_extent=[“2020-09-01”, “2021-12-20”], 7 spatial_extent={“west”: 3, “south”: 51, “east”: 3.1, “north”: 51.1}, 8 bands=[“classification”], 9 ) —> 10 cube.download(“maize.tif”) File D:\10_programfiles\Anaconda\Lib\site-packages\openeo\rest\datacube.py:2004, in DataCube.download(self, outputfile, format, options, validate) 2002 format = guess_format(outputfile) 2003 cube = self._ensure_save_result(format=format, options=options) → 2004 return self._connection.download(cube.flat_graph(), outputfile, validate=validate) File D:\10_programfiles\Anaconda\Lib\site-packages\openeo\rest\connection.py:1540, in Connection.download(self, graph, outputfile, timeout, validate) 1538 pg_with_metadata = self._build_request_with_process_graph(process_graph=graph) 1539 self._preflight_validation(pg_with_metadata=pg_with_metadata, validate=validate) → 1540 response = self.post( 1541 path=“/result”, 1542 json=pg_with_metadata, 1543 expected_status=200, 1544 stream=True, 1545 timeout=timeout or DEFAULT_TIMEOUT_SYNCHRONOUS_EXECUTE, 1546 ) 1548 if outputfile is not None: 1549 with Path(outputfile).open(mode=“wb”) as f: File D:\10_programfiles\Anaconda\Lib\site-packages\openeo\rest\connection.py:217, in RestApiConnection.post(self, path, json, **kwargs) 209 def post(self, path: str, json: Optional[dict] = None, **kwargs) → Response: 210 “”" 211 Do POST request to REST API. 212 (…) 215 :return: response: Response 216 “”" → 217 return self.request(“post”, path=path, json=json, allow_redirects=False, **kwargs) File D:\10_programfiles\Anaconda\Lib\site-packages\openeo\rest\connection.py:756, in Connection.request(self, method, path, headers, auth, check_error, expected_status, **kwargs) 749 return super(Connection, self).request( 750 method=method, path=path, headers=headers, auth=auth, 751 check_error=check_error, expected_status=expected_status, **kwargs, 752 ) 754 try: 755 # Initial request attempt → 756 return _request() 757 except OpenEoApiError as api_exc: 758 if api_exc.http_status_code == 403 and api_exc.code == “TokenInvalid”: 759 # Auth token expired: can we refresh? File D:\10_programfiles\Anaconda\Lib\site-packages\openeo\rest\connection.py:749, in Connection.request.._request() 748 def _request(): → 749 return super(Connection, self).request( 750 method=method, path=path, headers=headers, auth=auth, 751 check_error=check_error, expected_status=expected_status, **kwargs, 752 ) File D:\10_programfiles\Anaconda\Lib\site-packages\openeo\rest\connection.py:164, in RestApiConnection.request(self, method, path, headers, auth, check_error, expected_status, **kwargs) 162 expected_status = ensure_list(expected_status) if expected_status else 163 if check_error and status >= 400 and status not in expected_status: → 164 self._raise_api_error(resp) 165 if expected_status and status not in expected_status: 166 raise OpenEoRestError(“Got status code {s!r} for {m} {p}
(expected {e!r}) with body {body}”.format( 167 m=method.upper(), p=path, s=status, e=expected_status, body=resp.text) 168 ) File D:\10_programfiles\Anaconda\Lib\site-packages\openeo\rest\connection.py:196, in RestApiConnection._raise_api_error(self, response) 190 error_message = ( 191 “Received 502 Proxy Error.” 192 " This typically happens when a synchronous openEO processing request takes too long and is aborted." 193 " Consider using a batch job instead." 194 ) 195 exception = OpenEoApiPlainError(message=text, http_status_code=status_code, error_message=error_message) → 196 raise exception OpenEoApiError: [500] Internal: Failed to process synchronously on backend vito: OpenEoApiError(‘[401] unknown: Unauthorized’) (ref: r-b8d047d75e644e829bf8bc210c6dd862)