<type 'exceptions.UnboundLocalError'> | Python 2.7.18: /home/pacs/edv06/users/admin/virtualenv/bin/python Thu Dec 12 00:47:22 2024 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/pacs/edv06/users/admin/virtualenv/lib/python2.7/site-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>) |
556 """Runs the handler, flushes the streams, and ends the request.""" |
557 try: |
=> 558 protocolStatus, appStatus = self.server.handler(self) |
559 except: |
560 traceback.print_exc(file=self.stderr) |
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>> |
/home/pacs/edv06/users/admin/virtualenv/lib/python2.7/site-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>) |
1116 try: |
1117 try: |
=> 1118 result = self.application(environ, start_response) |
1119 try: |
1120 for data in result: |
result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <function runner>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/home/doms/www.hanmark.de/fastcgi-ssl/', 'CONTEXT_PREFIX': '/fastcgi-bin/', 'DOCUMENT_ROOT': '/home/doms/www.hanmark.de/htdocs-ssl', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.hanmark.de', ...}, start_response = <function start_response> |
/home/pacs/edv06/users/admin/hanmark/website/hanmark.py in runner(environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/home/doms/www.hanmark.de/fastcgi-ssl/', 'CONTEXT_PREFIX': '/fastcgi-bin/', 'DOCUMENT_ROOT': '/home/doms/www.hanmark.de/htdocs-ssl', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.hanmark.de', ...}, response=<function start_response>) |
102 return view.handle(method) |
103 |
104 |
105 def runner(environ, response): |
=> 106 return Hanmark(environ, response, __mapping, __db).run() |
global Hanmark = <class 'hanmark.Hanmark'>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/home/doms/www.hanmark.de/fastcgi-ssl/', 'CONTEXT_PREFIX': '/fastcgi-bin/', 'DOCUMENT_ROOT': '/home/doms/www.hanmark.de/htdocs-ssl', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.hanmark.de', ...}, response = <function start_response>, global __mapping = <mapping.Mapping object>, global __db = {'charset': 'utf8', 'db': 'hanmark', 'host': 'localhost', 'passwd': 'EyRuPWF6iv6iQM8B1T3xWnh3xscacYJs', 'port': 33306, 'user': 'hanmark'}, ).run undefined |
/home/pacs/edv06/users/admin/hanmark/weblib/application.py in run(self=<hanmark.Hanmark object>) |
61 except: |
62 (status, header, result,) = self.internalservererror() |
=> 63 connection.close() |
64 self.response(status, header) |
65 return [result.encode('utf-8')] |
connection undefined |
<type 'exceptions.UnboundLocalError'>: local variable 'connection' referenced before assignment
args =
("local variable 'connection' referenced before assignment",)
message =
"local variable 'connection' referenced before assignment"