GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [Vision] No Exceptions raised for non-existent gcs uri's · Issue #3268 · googleapis/google-cloud-python Closed Labels api: visionIssues related to the Cloud Vision API. DescriptionHi, Google Vision python package doesn't raise exceptions for non-existent gcs uri resources, instead returns an annotation object with empty list for texts. This makes it harder to tell if the resource doesn't exist or if the vision api failed to detect any text.
from google.cloud import storage, vision from google.cloud.storage import Blob from google.cloud.vision.image import Feature from google.cloud.vision.image import FeatureTypes features = [Feature(FeatureTypes.TEXT_DETECTION)] vision_client = vision.Client() image = vision_client.image(source_uri="<gcs uri>") annotations = image.detect(features) if annotations: annotation = annotations[0] if annotation.texts: text = annotation.texts[0].description else: text = None print(text) Activity
MetadataMetadataAssigneesLabelsapi: visionIssues related to the Cloud Vision API. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |