MCPcopy
hub / github.com/google/earthengine-api / _execute_cloud_call

Function _execute_cloud_call

python/ee/data.py:341–361  ·  view source on GitHub ↗

Executes a Cloud API call and translates errors to EEExceptions. Args: call: The Cloud API call, with all parameters set, ready to have execute() called on it. num_retries: How many times retryable failures should be retried. Returns: The value returned by executing that call

(
    call: googleapiclient.http.HttpRequest, num_retries: int | None = None
)

Source from the content-addressed store, hash-verified

339
340
341def _execute_cloud_call(
342 call: googleapiclient.http.HttpRequest, num_retries: int | None = None
343) -> Any:
344 """Executes a Cloud API call and translates errors to EEExceptions.
345
346 Args:
347 call: The Cloud API call, with all parameters set, ready to have execute()
348 called on it.
349 num_retries: How many times retryable failures should be retried.
350
351 Returns:
352 The value returned by executing that call.
353
354 Raises:
355 EEException if the call fails.
356 """
357 num_retries = _get_state().max_retries if num_retries is None else num_retries
358 try:
359 return call.execute(num_retries=num_retries)
360 except googleapiclient.errors.HttpError as e:
361 raise _translate_cloud_exception(e) # pylint: disable=raise-missing-from
362
363
364def _translate_cloud_exception(

Callers 15

getAssetFunction · 0.85
listAssetsFunction · 0.85
listBucketsFunction · 0.85
getMapIdFunction · 0.85
getFeatureViewTilesKeyFunction · 0.85
callFunction · 0.85
getPixelsFunction · 0.85
computePixelsFunction · 0.85
computeImagesFunction · 0.85
fetch_tileMethod · 0.85
computeValueFunction · 0.85
getThumbnailFunction · 0.85

Calls 2

_get_stateFunction · 0.85

Tested by

no test coverage detected