Vision 'detect' not returning values from remote url since 0.90.0
See original GitHub issueFollow this closed issue #2087 , I tried different versions of vision to see when it starts happening.
I was running vision 0.70.0 and install vision like this:
npm install google-cloud --save
var gcloud = require('google-cloud');
var vision = gcloud.vision();
And it detects remote URL’s like a charm.
Since hearing this way of installing google-cloud is deprecated, I tried installing the bundle @google-cloud/vision
. That’s when I encountered the same error as the closed issue. Looking closely, the new install updated my version of vision. I tried 0.70.0 and 0.80.0 which works fine.
From 0.90.0 remote URL detects gives this error:
PartialFailureError: A failure occurred during this request.
at /Users/jasonluu/Documents/v2/node_modules/@google-cloud/vision/src/index.js:420:15
at /Users/jasonluu/Documents/v2/node_modules/@google-cloud/vision/src/index.js:121:5
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
errors:
[ { code: 500,
message: 'image-annotator::error(12): We can not access the URL currently. Please download the image and pass it in.',
type: 'labels' } ] }
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (12 by maintainers)
Top Results From Across the Web
0.90: Remote UI, Streams, User Groups - Home Assistant
In Firefox it gives me a “The page you are trying to view cannot be shown because the authenticity of the received data...
Read more >is there a way to easily check if the image url is valid or not?
The most elegant solution is using a XMLHttpRequest and check the response code. If it's 200, the image exists, if it's something different ......
Read more >Releases - NocoDB Documentation
With Ctrl + C and Ctrl + V , we can copy the data from one cell to another, even to another tables....
Read more >Bug listing with status CONFIRMED as at 2022/12/26 10:46:31
trapdoor2 (new ebuild)" status:CONFIRMED resolution: severity:enhancement · Bug:56360 - "app-misc/shunt-1.6.3 - restart processes in a pipe without breaking ...
Read more >/manual.md | std@0.36.0 | Deno
It uses modules referenced as URLs or file paths. Deno does not use package.json in its module resolution algorithm. All async actions in...
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
@JustinBeckwith @kinwa91 @sduskis – do you think someone from the Vision team should take a look? Multiple users are reporting intermittent success with the same URL. Would you prefer they each got in touch individually with the Vision support team via the methods on their Support page?
If you want to use
image.source.imageUri
in your application, you need to account for the Cloud Vision API occasionally (or frequently, depending on your QPS and the hosts) returning with the error:“Why? That sounds broken! I don’t understand!?”
After reading lots of use-cases and user issues, I discovered that it comes down to two limitations:
After some digging around, I found various references to the documentation of the
imageUri
parameter, from the actual comment on theimageUri
:ImageSource.imageUri
ImageSource.image_uri
To help users in the future who are learning to use the Cloud Vision API, I added this information to the main page which describes how to Make a Request, specifically in the section describing how to provide the image as either a base64-encoded string (
image.content
) or a URI to an image in Google Cloud Storage or HTTP(S) URL (image.source.imageUri
):Updated website page:
I hope this helps to explain the reason for these errors!
There are various workarounds which may or may not work for you, depending on your application:
(in no particular order):
Using truncated exponential backoff, which is a standard error handling strategy
(example implementations)
Provide the image as a base64-encoded string to
image.content
(base64-encoding instructions for various platforms)Provide the image from Google Cloud Storage
(Migrating from Amazon S3 to Cloud Storage may be useful if you choose this route)
Hope this helps!