Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Update README Example Usage for v2 #67

@dylancaponi

Description

@dylancaponi

Environment details

  • OS type and version: macOS Mojave 10.14.6
  • Python version: Python 3.8.5
  • pip version: pip 20.2.3
  • google-cloud-vision version: 2.0.0

Steps to reproduce

  1. Run the example usage code: https://github.com/googleapis/python-vision#example-usage
  2. Get error 'google.cloud.vision' has no attribute 'enums'

Guessing this has to do with: https://googleapis.dev/python/vision/latest/UPGRADING.html

Code example

from google.cloud import vision

client = vision.ImageAnnotatorClient()
response = client.annotate_image({
  'image': {'source': {'image_uri': 'gs://my-test-bucket/image.jpg'}},
  'features': [{'type': vision.enums.Feature.Type.FACE_DETECTION}],
})

Stack trace

Traceback (most recent call last):
  File "example.py", line 6, in <module>
    'features': [{'type': vision.enums.Feature.Type.FACE_DETECTION}],
AttributeError: module 'google.cloud.vision' has no attribute 'enums'

Metadata

Metadata

Assignees

Labels

api: visionIssues related to the googleapis/python-vision API.status: investigatingThe issue is under investigation, which is determined to be non-trivial.

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