With Python 3.0, wsgi.input returns bytes. What ever you are giving
that to probably expects string (unicode).

You are going to have to read in wsgi.input and convert it to string
using appropriate encoding.

Graham

2009/1/18 gert <[email protected]>:
>
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60] mod_wsgi
> (pid=25274): Exception occurred processing WSGI script '/home/www/
> appwsgi/www/lib/upload.py'.
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60] Traceback
> (most recent call last):
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]   File "/
> home/www/appwsgi/www/lib/upload.py", line 8, in application
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]     bin =
> FieldStorage(fp=environ['wsgi.input'], environ=environ)
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]   File "/usr/
> python/lib/python3.0/cgi.py", line 479, in __init__
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]
> self.read_multi(environ, keep_blank_values, strict_parsing)
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]   File "/usr/
> python/lib/python3.0/cgi.py", line 599, in read_multi
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]
> parser.feed(self.fp.read())
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]   File "/usr/
> python/lib/python3.0/email/feedparser.py", line 152, in feed
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]
> self._input.push(data)
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]   File "/usr/
> python/lib/python3.0/email/feedparser.py", line 99, in push
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60]     data,
> self._partial = self._partial + data, ''
> [Sat Jan 17 20:44:33 2009] [error] [client 80.200.222.60] TypeError:
> Can't convert 'bytes' object to str implicitly
>
> HELP ?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to