Forums

Output is pdf but error

2020-10-04 17:38:12,475: Error running WSGI application 2020-10-04 17:38:12,476: SystemError: <built-in function uwsgi_sendfile> returned a result with an error set 2020-10-04 17:38:12,476: File "/home/shchung2/.virtualenvs/env/lib/python3.7/site-packages/django/core/handlers/wsgi.py", line 149, in call 2020-10-04 17:38:12,476: response = environ'wsgi.file_wrapper'

What can we do?

Looks like that may help you https://help.pythonanywhere.com/pages/FlaskSendFileBytesIO/

Hi, We do not understand how to change the code from the example https://help.pythonanywhere.com/pages/FlaskSendFileBytesIO/. But we do not have the problem before. Can you provide complete example how to fit it on pythonanywhere?

What code do you have in the view that is raising that error? We may be able to advise you on how to change it.

Hi We are trying this. https://github.com/jobsta/albumapp-django Thanks

You will need to find the code for the view that is causing the problem. You can do that from the URL of the view which would appear in a urls.py in the application. Then you can use that to find the actual code for the view. If it's just delivering a file, you should be able to identify the part of the view that is delivering the file and then make the necessary changes.