내가 https://googlecloudplatform.github.io/google-cloud-python/stable/vision-usage.html구글 비전 API 오류 코드
from google.cloud import vision
client = vision.Client()
image = client.image('./image.jpg')
safe_search = image.detect_safe_search()
image.detect_safe_search의 예제 코드를 시도하고 결과의 주요 오류가 API에서 반환 던졌습니다. 결과 dict를 인쇄 할 때 오류 응답을 주었기 때문에 예상 된 키가 없다는 것을 발견했습니다. Google API에서 반환 된 응답은
{u'error': {u'message': u'image-annotator::error(12): Image processing error!', u'code': 13}}
api의 문서에서 오류 코드에 대한 참조를 찾을 수 없습니다. 내가 뭘 놓치고 있니?
domain.com/xzy.jpg와 동일한 문제가있었습니다. 도메인 /xzy.jpg를 www.domain.com/xyz.jpg로 전달하는 .htaccess 규칙이 있었기 때문입니다. 이미지 URL을 www와 함께 보냅니다. 문제를 해결했다. –