Google Certified Professional Data Engineer

Sign Up Free or Log In to participate!

Vision module changed

It looks like the vision module has changed slightly, as it failed with the following:

Traceback (most recent call last): File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py", line 449, in run_background_function _function_handler.invoke_user_function(event_object) File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py", line 268, in invoke_user_function return call_user_function(request_or_event) File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py", line 265, in call_user_function event_context.Context(**request_or_event.context)) File "/user_code/main.py", line 13, in check_images image = vision.types.Image() AttributeError: module ‘google.cloud.vision’ has no attribute ‘types’

It ran successfully when the following line:

image = vision.types.Image()

was updated to:

image = vision.Image()

alee

I am unable to deploy the cloud function:

alee

Here is the error:

alee

ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: could not resolve storage source: googleapi: Error 404: Not Found, notFound

alee

I also changed the permissions so that the service account has the rights to create and invoke cloud functions this is really annoying

1 Answers

Thanks Eric, the lab code has been updated!

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?