-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gunicorn+gevent/eventlet+flask+send_file, cStringIO? #1160
Comments
@YiJunJun what is the issue? |
Traceback (most recent call last): |
@tilgovi ping The issue comes from the removal of the fileobject testing: I am really not sure we shouldn't be strict there and only accept fileobjects providing a @YiJunJun in the mean time why do you want to use sendfile here? Why not simply returning an iterator (the StringIO would be enough). Gunicorn will stream it. |
I can solve this problem.I just want to report a problem.Thank you for your answer. |
Got the same issue. Wonder if it can't be caught more softly. |
Got the same problem here too. How can this be avoided ? |
We can catch the exception. I should be able to get to this over the weekend if no one else can. Closing any other issues on the milestone will help get this released faster. |
@tilgovi sounds like a plan :) |
If the filelike response object has no `fileno` attribute, then skip trying to use sendfile rather than failing with an error. Close benoitc#1160
in flask:
@app.route("/test")
def test():
import cStringIO
output = cStringIO.StringIO()
...
return send_file(output)
The text was updated successfully, but these errors were encountered: