Sanpreet Singh
1 min readAug 30, 2019

Hello Muhammad Zain Qasmi, I hope you are fine. I had read the article and I am also trying to deploy flask app on google app engine. I had been successful in the following files.

  1. Creating the flask application
  2. Creating the lib folder
  3. Creating the appengine_config.py to add the lib folder so that packages can be fetched when the application is deployed.
  4. Creating the app.yaml to test the app locally using google SDK.

All these steps are created successfully, now to test the code on the local system I ran the below command

/usr/lib/google-cloud-sdk/bin/dev_appserver.py — admin_port=9000 — port=9999 app.yaml

But when I tried to run my application at my local machine at port number 9999, I got the below error

File “/usr/lib/python2.7/multiprocessing/__init__.py”, line 65, in <module>
from multiprocessing.util import SUBDEBUG, SUBWARNING
File “/usr/lib/python2.7/multiprocessing/util.py”, line 41, in <module>
from subprocess import _args_from_interpreter_flags
ImportError: cannot import name _args_from_interpreter_flags

I tried to search on internet about this error and came with the following conclusion

“You can’t use multiprocessing on appengine. Multiprocessing is for
creating and coordinating sub processes for parallelism.
That is not an option on appengine. Appengine has other facilities like
async methods, task queues and backends (which can use traditional
threading).”

I mean that this error comes because of subprocess.py as well as multiprocessing.

Is there any way to get rid of this error because it makes me worried how to deploy the application on google app engine.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response