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

Vision API failing on Standard Environment Appengine #3262

Closed
baradas opened this issue Apr 1, 2017 · 3 comments
Closed

Vision API failing on Standard Environment Appengine #3262

baradas opened this issue Apr 1, 2017 · 3 comments
Assignees
Labels
api: vision Issues related to the Cloud Vision API.

Comments

@baradas
Copy link

baradas commented Apr 1, 2017

Are the cloud vision python clients ready for use on Standard Environment on AppEngine?

Steps as below :

pip install --upgrade google-cloud --target ./lib

Redeployed the project and during the invocation of the API I get the below stacktrace.

    from google.cloud import vision
  File "/base/data/home/apps/s~app-test/20170202t220112.400250114231361871/lib/google/cloud/vision/__init__.py", line 21, in <module>
    from google.cloud.vision.client import Client
  File "/base/data/home/apps/s~app-test/20170202t220112.400250114231361871/lib/google/cloud/vision/client.py", line 22, in <module>
    from google.cloud.vision._gax import _GAPICVisionAPI
  File "/base/data/home/apps/s~app-test/20170202t220112.400250114231361871/lib/google/cloud/vision/_gax.py", line 17, in <module>
    from google.cloud.gapic.vision.v1 import image_annotator_client
  File "/base/data/home/apps/s~app-test/20170202t220112.400250114231361871/lib/google/cloud/gapic/vision/v1/image_annotator_client.py", line 31, in <module>
    from google.gax import api_callable
  File "/base/data/home/apps/s~app-test/20170202t220112.400250114231361871/lib/google/gax/__init__.py", line 36, in <module>
    import multiprocessing as mp
  File "/base/data/home/apps/s~app-test/20170202t220112.400250114231361871/lib/multiprocessing/__init__.py", line 87, in <module>
    import _multiprocessing
ImportError: dynamic module does not define init function (init_multiprocessing)

The cloud vision python clients seem to be doing fine on a compute engine box.

@baradas baradas changed the title Cloud Vision API GAE Vision API failing on Standard Environment Appengine Apr 1, 2017
@dhermes dhermes added the api: vision Issues related to the Cloud Vision API. label Apr 2, 2017
@lukesneeringer
Copy link
Contributor

google.gax does not work at all on GAE Standard (because the gRPC transport is not supported).
Set the GOOGLE_CLOUD_DISABLE_GRPC environment variable to 'true' and it should fall back to the HTTP transport and work without issue.

Feel free to re-open if this does not fix the problem for you.

@baradas
Copy link
Author

baradas commented Apr 3, 2017

Added below to app.yaml and redeployed using gcloud but still the same. It's unable to detect the environment variable.

env_variables:
  GOOGLE_CLOUD_DISABLE_GRPC: 'true'

@jmsuresh
Copy link

Anyone know what is the recommended way now to use Vision API from appengine Python standard environment.

parthea pushed a commit that referenced this issue Oct 21, 2023
…ions [(#3262)](GoogleCloudPlatform/python-docs-samples#3262)

Co-authored-by: Benson Kuang <benkuang@google.com>
Co-authored-by: Takashi Matsuo <tmatsuo@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vision Issues related to the Cloud Vision API.
Projects
None yet
Development

No branches or pull requests

4 participants