View previous topic :: View next topic |
Author |
Message |
LucianoBarcaro n00b
Joined: 16 Mar 2011 Posts: 5 Location: Cascavel
|
Posted: Sat Jun 07, 2014 11:44 am Post subject: nginx + uwsgi + python33 doesn't work |
|
|
Hi all,
I'm configuring nginx+uwsgi with python33 plugin, but this combination does no produce any output.
If I use python27 plugin, it works as expected.
With python33 plugin does not give me nothing (nor any error message).
In uwsgi log, it shows me that python33 is loaded.
My init script is just as simple:
Code: | from sys import version
def application(env, start_response):
body = repr(version)
headers = []
headers.append(('Content-type', 'text/plain'))
headers.append(('Content-Length', str(len(body))))
start_response('200 OK', headers)
print('passed here')
return [body]
|
and, when I fire lynx -dump http://test.net it gives me nothing (zero size response), but, the print works (appears in uwsgi logs)
This same init script works as expected if I change plugin from python33 to 27.
Any ideas? |
|
Back to top |
|
|
LucianoBarcaro n00b
Joined: 16 Mar 2011 Posts: 5 Location: Cascavel
|
Posted: Tue Jun 17, 2014 1:38 pm Post subject: [SOLVED] Re: nginx + uwsgi + python33 doesn't work |
|
|
LucianoBarcaro wrote: | Hi all,
I'm configuring nginx+uwsgi with python33 plugin, but this combination does no produce any output.
If I use python27 plugin, it works as expected.
With python33 plugin does not give me nothing (nor any error message).
In uwsgi log, it shows me that python33 is loaded.
My init script is just as simple:
Code: | from sys import version
def application(env, start_response):
body = repr(version)
headers = []
headers.append(('Content-type', 'text/plain'))
headers.append(('Content-Length', str(len(body))))
start_response('200 OK', headers)
print('passed here')
return [body]
|
and, when I fire lynx -dump http://test.net it gives me nothing (zero size response), but, the print works (appears in uwsgi logs)
This same init script works as expected if I change plugin from python33 to 27.
Any ideas? |
Seems that uwsgi doesn't like unicode return.
Needed to convert the output to bytes. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|