google.api_core.exceptions.ServiceUnavailable: 503 Getting metadata from plugin failed with error: 'str' object has no attribute 'before_request'
问题 I'm trying to iterate through images in a directory and get their labels through goodle_api_vision. This is my code: def run_quickstart(): import io import os import cv2 import numpy as np from google.cloud import vision from google.cloud.vision import types client = vision.ImageAnnotatorClient(credentials = 'service_acc_key.json') path = 'E:\wrand\\' for image_path in os.listdir(path): file_name = path + image_path content = cv2.imread(file_name) # Loads the image into memory #with io.open