E
E
Eugene2017-01-23 12:12:48
Python
Eugene, 2017-01-23 12:12:48

How to fix wsgi.errors header error? And is it necessary?

Dealing with publishing a pythonic application with uwsgi (python3.4)
If you output key-value pairs for the env dictionary (env['wsgi.errors']) that contains the request headers, then there is a pair like this:
wsgi.errors <_io. TextIOWrapper name=2 mode='w' encoding='ANSI_X3.4-1968'>
No matter how I googled, I didn't find anything close. At the same time, the application itself works, I do not see any errors.
To understand what I mean - here is the output of all env dictionary keys: https://webdev.bekhterev.me/test/headers

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-01-23
@misant

As it turned out, this is not an error, but an object where you need to write uwsgi errors.
For example:
print('Hello, Lepra!', file=env['wsgi.errors'])
Helped:
stackoverflow.com/questions/29959267/python-wsgi-e...
https://www.python.org /dev/peps/pep-3333/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question