Simple reproducible case:
importioimportosfromgoogle.cloudimportvisionvision_client=vision.Client()
file_name=os.path.join(
os.path.dirname(__file__),
'resources/wakeupcat.jpg')
withio.open(file_name, 'rb') asimage_file:
image=vision_client.image(
content=image_file.read())
labels=image.detect_labels()
print('Labels:')
forlabelinlabels:
print(label.description)works fine on Python 2, fails on Python 3.
Simple reproducible case:
works fine on Python 2, fails on Python 3.