Traceback (most recent call last): File "/home/PU/amith.srinivasan/xxx/PCD.wsgi", line 7, in application start_response(status, response_headers) TypeError: *expected byte string object for status, value of type str found *
When i set the WSGi application i get the error as shown above. My python version is : python -V Python 2.6.4 Thanks Amith On Mon, Jul 12, 2010 at 3:36 AM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > On 11 July 2010 21:22, Amps <amit...@gmail.com> wrote: > > after i install wsgi and try to configure , the page is showing only > > code but not executing i gueess ... what is the reason... > > > > example .. the below code is displayed , when i ask for the page after > > i did the WSGIScriptAlias mentioning the location. > > > > def application(environ, start_response): > > status = '200 OK' > > output = 'Hello World!' > > > > response_headers = [('Content-type', 'text/plain'), > > ('Content-Length', str(len(output)))] > > start_response(status, response_headers) > > > > return [output] > > What instructions are you following? Are you using: > > http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide > > Where did you put the WSGI script file? > > Post the snippet from Apache configuration showing how you configured > Apache for mod_wsgi. Also indicate what DocumentRoot directive is set > to in Apache configuration. > > At a guess this looks like you stuck the WSGI script file in Apache > document root (which you preferably shouldn't), then managed not to > get WSGIScriptAlias correct or didn't restart Apache, and then used a > URL which caused the WSGI script file to be served up as plain static > file rather than through mod_wsgi. > > Graham > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to modw...@googlegroups.com. > To unsubscribe from this group, send email to > modwsgi+unsubscr...@googlegroups.com<modwsgi%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- Amith K S ph :-) 09959844491 -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to modw...@googlegroups.com. To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.