Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError fix for Imagemagick Cloud Vision API tutorial #490

Closed
wants to merge 2 commits into from

Conversation

DevanM
Copy link

@DevanM DevanM commented Sep 23, 2017

Incorrect version dependency for @google-cloud/vision 0.12. Should be 0.11.4. This results in a critical TypeError for ImageMagik tutorial.

This fix allows index.js to be backwards compatible for function calls against vision API 0.11.4 -- vision.detectSafeSearch. Results in TypeError: vision.detectSafeSearch is not a function.

Cloud Vision API v0.12 has deprecated detectSafeSearch() in favor of safeSearchDetection().

Logs reference on Cloud Function: blurOffensiveImages
"TypeError: vision.detectSafeSearch is not a function at exports.blurOffensiveImages (/user_code/index.js:44:17) at /var/tmp/worker/worker.js:659:26 at process._tickDomainCallback (internal/process/next_tick.js:135:7)"

Incorrect version dependency for @google-cloud/vision 0.12. Should be 0.11.4.  This results in a critical TypeError for ImageMagik tutorial.

This fix allows index.js to be backwards compatible for function calls against vision API 0.11.4 -- vision.detectSafeSearch. Results in TypeError: vision.detectSafeSearch is not a function. 

Cloud Vision API v0.12 has deprecated detectSafeSearch() in favor of safeSearchDetection().

Logs reference on Cloud Function: blurOffensiveImages
"TypeError: vision.detectSafeSearch is not a function at exports.blurOffensiveImages (/user_code/index.js:44:17) at /var/tmp/worker/worker.js:659:26 at process._tickDomainCallback (internal/process/next_tick.js:135:7)"
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@DevanM
Copy link
Author

DevanM commented Sep 23, 2017

Signed!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 14, 2018
@JustinBeckwith
Copy link
Contributor

Greetings! It looks like we updated this in another commit at some point. Thank you for the PR!

@codecov
Copy link

codecov bot commented Jun 14, 2018

Codecov Report

Merging #490 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #490   +/-   ##
=======================================
  Coverage   48.52%   48.52%           
=======================================
  Files           1        1           
  Lines          68       68           
=======================================
  Hits           33       33           
  Misses         35       35

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfe30b9...5da60d4. Read the comment docs.

NimJay pushed a commit that referenced this pull request Nov 11, 2022
ace-n pushed a commit that referenced this pull request Nov 11, 2022
telpirion pushed a commit that referenced this pull request Nov 16, 2022
Shabirmean pushed a commit that referenced this pull request Feb 16, 2023
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants