Authentication hangs with no error message for vision API example
See original GitHub issueThe vision API example here appears to fail during authentication without reporting an error message. Note that GOOGLE_APPLICATION_CREDENTIALS
does point to a JSON key (although I don’t claim infallibility on this).
$ python doctext.py receipt.jpg -out_file out.jpg
^CTraceback (most recent call last):
File "doctext.py", line 88, in <module>
render_doc_text(args.detect_file, args.out_file)
File "doctext.py", line 68, in render_doc_text
bounds = get_document_bounds(filein, FeatureType.PAGE)
File "doctext.py", line 40, in get_document_bounds
document = image.detect_full_text()
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/cloud/vision/image.py", line 195, in detect_full_text
annotations = self.detect(features)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/cloud/vision/image.py", line 143, in detect
return self._detect_annotation(images)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/cloud/vision/image.py", line 117, in _detect_annotation
return self.client._vision_api.annotate(images)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/cloud/vision/_gax.py", line 69, in annotate
responses = annotator_client.batch_annotate_images(requests).responses
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/cloud/gapic/vision/v1/image_annotator_client.py", line 181, in batch_annotate_images
return self._batch_annotate_images(request, options)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/gax/api_callable.py", line 419, in inner
return api_caller(api_call, this_settings, request)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/gax/api_callable.py", line 407, in base_caller
return api_call(*args)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/gax/api_callable.py", line 368, in inner
return a_func(*args, **kwargs)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/gax/retry.py", line 120, in inner
return to_call(*args)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/google/gax/retry.py", line 68, in inner
return a_func(*updated_args, **kwargs)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/grpc/_channel.py", line 506, in __call__
credentials)
File "/home/fenkb/google-vision/lib/python3.4/site-packages/grpc/_channel.py", line 500, in _blocking
_handle_event(completion_queue.poll(), state,
File "src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi", line 114, in grpc._cython.cygrpc.CompletionQueue.poll (src/python/grpcio/grpc/_cython/cygrpc.c:10475)
KeyboardInterrupt
Ubuntu
`python` is version `3.4.3`
`google-cloud` is version `0.23.0`
`google-cloud-vision` is version `0.23.3`
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Authentication hangs with no error message for vision API example
The vision API example here appears to fail during authentication without reporting an error message. Note that GOOGLE_APPLICATION_CREDENTIALS does point to ...
Read more >c# - Detecting content in Google Cloud Vision for .NET does ...
My code looks like this: using System; using System.Windows; using Google.Apis.Auth.OAuth2; using Google.
Read more >Using the Vision API with Python - Google Codelabs
In this codelab, you will learn how to use the Google Cloud Vision API with Python.
Read more >Quickstart: Set up the Vision API - Google Cloud
Execute the following command and verify that no error occurs and that ... All Vision API command line REST samples use that command...
Read more >Azure Cognitive Services Computer Vision SDK for Python
Errors returned by the service correspond to the same HTTP status codes returned for REST API requests. For example, if you try to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Note that there is now a completely different
google-cloud-vision
. Is anyone getting this error while usingImageAnnotatorClient
?Actually, closing this, since it seems unlikely the issue will persist into the new client. Feel free to reopen if I am wrong. 😃