question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Authentication hangs with no error message for vision API example

See original GitHub issue

The 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:closed
  • Created 6 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lukesneeringercommented, Aug 8, 2017

Note that there is now a completely different google-cloud-vision. Is anyone getting this error while using ImageAnnotatorClient?

0reactions
lukesneeringercommented, Aug 8, 2017

Actually, closing this, since it seems unlikely the issue will persist into the new client. Feel free to reopen if I am wrong. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found