Hi, I have fastcgi working using nginx. How can test a counter to see if its really working?
Ii I do the below I get this error: <type 'exceptions.UnboundLocalError'> at /pixel/ local variable 'count' referenced before assignment If I take out counter the code works. #!/usr/bin/python # -*- coding: utf-8 -*- import web import redis import urlparse #chmod 755 index.py #spawn-fcgi -d /home/ubuntu/workspace/rtbopsConfig/rtbPixelServer/ -f /home/ubuntu/workspace/rtbopsConfig/rtbPixelServer/index.py -a 127.0.0.1 -p 9001 urls = ("/.*", "index") app = web.application(urls, globals()) gobal count = 0 class index: def GET(self): env = web.ctx['environ'] QUERY_STRING = env['QUERY_STRING'] count = count + 1 return 'Hello pixel count qs %s %s' % (count,str(urlparse.parse_qs(QUERY_STRING))) if __name__ == "__main__": web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr) app.run() -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to webpy@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.