I have built an app for Google App Engine and while I tried running the app, it worked well. But when I deployed it, it threw internal server 500 error. When I checked the error report, it said, "No module named cloud in the directory"
Below is my requirements.txt
gunicorn==19.3.0
twilio==6.8.4
google-cloud-automl==0.1.1
google-cloud-storage==1.0.0
google-cloud==0.34.0
GoogleAppEngineCloudStorageClient==1.9.22.1
My Yaml file is as follows
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: .*
script: main.app
Imports used in the python file are
from google.cloud import automl_v1beta1 as automl
from google.cloud import storage
It worked when I ran manually. But after deploying , the error is
ImportError: No module named cloud
<module> (/base/data/home/apps/..
Thank you in advance
It looks like you're trying to deploy to the "First Generation" App Engine runtime. Unfortunately, you can't use the google-cloud Python libraries there.
The good news is that you can use the "Second Generation" instead, which allows you to install any library, including any of the google-cloud libraries like google-cloud-storage.
See this link for the difference between the two generations: https://cloud.google.com/appengine/docs/standard/appengine-generation
Google App Engine Python 3 Standard Environment Documentation: https://cloud.google.com/appengine/docs/standard/python3/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With