1

I'm trying to run a web app written in Python (using Flask) on Google App Engine in the python flexible environment (needs third party libraries not provided in standard environment).

The web app contains a simple form with the option to upload a file, which my app will then use to manipulate some data and serve up a new file as output. The app in its current state runs fine until a file exceeding 32 MB is uploaded.

According to this post - Upload file bigger than 40MB to Google App Engine? - the large file upload problem can be circumvented by using the Google Blobstore API.

An overview of the API is here: https://cloud.google.com/appengine/docs/python/blobstore/

I am having some trouble understanding this overview. In particular, my problem is simply being able to import the Blobstore API in my python code for the web app. In order to obtain a an upload URL, I have placed the following in my code:

from google.appengine.ext import blobstore
upload_url = blobstore.create_upload_url('/submit')

Finally, when I try to deploy the app using gcloud app deploy, it crashes with the message ImportError: No module named 'google'.

I don't understand how I can get this running. I thought the google appengine modules were already taken care of by the App Engine. Perhaps there is a line I can add to requirements.txt so that gcloud will install the proper libraries upon deployment?

Community
  • 1
  • 1

0 Answers0