Skip to content
This repository was archived by the owner on Mar 20, 2018. It is now read-only.
This repository was archived by the owner on Mar 20, 2018. It is now read-only.

Exception occurred in retry method that was not classified as transient #186

@pdknsk

Description

@pdknsk

I'm not sure how to read this exception.

  File "/home/user/.local/lib/python2.7/site-packages/google/cloud/vision/image.py", line 261, in detect_properties
    annotations = self.detect(features)
  File "/home/user/.local/lib/python2.7/site-packages/google/cloud/vision/image.py", line 143, in detect
    return self._detect_annotation(images)
  File "/home/user/.local/lib/python2.7/site-packages/google/cloud/vision/image.py", line 117, in _detect_annotation
    return self.client._vision_api.annotate(images)
  File "/home/user/.local/lib/python2.7/site-packages/google/cloud/vision/_gax.py", line 69, in annotate
    responses = annotator_client.batch_annotate_images(requests).responses
  File "/home/user/.local/lib/python2.7/site-packages/google/cloud/gapic/vision/v1/image_annotator_client.py", line 181, in batch_annotate_images
    return self._batch_annotate_images(request, options)
  File "/home/user/.local/lib/python2.7/site-packages/google/gax/api_callable.py", line 428, in inner
    return api_caller(api_call, this_settings, request)
  File "/home/user/.local/lib/python2.7/site-packages/google/gax/api_callable.py", line 416, in base_caller
    return api_call(*args)
  File "/home/user/.local/lib/python2.7/site-packages/google/gax/api_callable.py", line 376, in inner
    return a_func(*args, **kwargs)
  File "/home/user/.local/lib/python2.7/site-packages/google/gax/retry.py", line 127, in inner
    ' classified as transient', exception)
google.gax.errors.RetryError: GaxError(Exception occurred in retry method that was not classified as transient, caused by <_Rendezvous of RPC that terminated with (StatusCode.RESOURCE_EXHAUSTED, Insufficient tokens for quota 'DefaultGroup' and limit 'USER-100s' of service 'vision.googleapis.com' for consumer 'project_number:1234567890'.)>)

Now StatusCode.RESOURCE_EXHAUSTED makes me think this might be quote related, but I'm definitely way below limits. I'm running this manually a few times with 1-2 seconds in between. Usually the error occurs on the 4th or 5th run. I'm not sure what tokens refers to.

It's very simple code.

from google.cloud import vision

client = vision.Client()
image = client.image(source_uri = uri)
properties = image.detect_properties()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions