-1

I've created a Python-Flask app running on Openshift.com (that started out as a clone of https://github.com/ryanj/flask-postGIS). If a user stops the download of a file prematurely, the app crashes and throws a "Broken Pipe Error".

I've read [1], [2] that using the "gevent" library may help resolve/mitigate this issue. Even though I have added gevent into the "requirements.txt" and the "setup.py" files, when app.py runs, it still cannot find it, uses Flask, and I continue to run into the Broken Pipe error as described below.

What step/code am I missing that will allow this app to use gevent instead of flask?

Community
  • 1
  • 1
RyanKDalton
  • 1,271
  • 3
  • 14
  • 30

1 Answers1

0

install gevent with pip

pip install gevent
mtt2p
  • 1,818
  • 1
  • 15
  • 22
  • Isn't that essentially the same as adding gevent to the "setup.py" and "requirements.py" files? My understanding was that putting gevent in these files should automatically install the libraries that are needed for the project. – RyanKDalton Jan 24 '17 at 23:54
  • @RyanDalton No putting the files in requirments.txt **doesn't automatically** install them you still have to install the modules with pip. The requirements.txt file exists as a guide/list of python libraries to install when you or someone else installs your application – danidee Jan 25 '17 at 00:12
  • I'm new to this, but that's not how I read the OpenShift [docs](https://blog.openshift.com/how-to-install-and-configure-a-python-flask-dev-environment-deploy-to-openshift/): _"OpenShift uses a setup.py file to configure your app. The setup.py file is where we will list the flask packages that we want to install in our OpenShift gear... If you need other modules that are not listed you can just add another element to the file. The setup.py installs the dependencies listed as is the automated way of installing modules. It is equivalent to the pip install commands that were previously used."_ – RyanKDalton Jan 25 '17 at 18:32