On 12 August 2011 05:22, mams.827 <[email protected]> wrote:
> Hi, I installed the module, but when I test, show the Error: "sequence
> of byte string values expected, value of type str found".
Can you clarify which mod_wsgi version and which Python version you are using.
> I changed the return in the example.
>
>
> def application(environ, start_response):
> status = '200 OK'
> output = b'Hello World!'
> response_headers = [('Content-type', 'text/plain'),
> ('Content-Length', str(len(output)))]
> start_response(status, response_headers)
>
> return [bytes(output, 'utf-8')] // I Change this
If this is for Python 3.X, then 'output' is already bytes and so you
wouldn't need to do:
bytes(output, 'utf-8')
If I do that on Python 3.2 I get:
>>> bytes(output, 'utf-8')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: encoding or errors without a string argument
So, shouldn't even get into mod_wsgi. Thus why want to clarify which
versions of things you are using.
Graham
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.