integer division or modulo by zero
/home/blackbird/Developement/WSGIarea/colubrid/trunk/examples/objectapplication.py in index, line 38
A problem occurred in your Python WSGI application. Here is the sequence of function calls leading up to the error, in the order they occurred.
334 | try: |
335 | app = getattr(__import__(self.module, '', '', ['']), self.handler) |
336 | result = app(environ, start_response) |
337 | try: |
338 | request = result.request |
339 | except: |
340 | pass |
341 | appiter = iter(result) |
342 | for line in appiter: |
343 | yield line |
344 | except: |
345 | exc_info = sys.exc_info() |
346 | try: |
347 | headers = [('Content-Type', 'text/html')] |
Name | Value |
---|---|
app | <class 'examples.objectapplication.DispatcherApplication'> |
appiter | None |
environ | {'APPLICATION_REQUEST': '/blog/', 'DOCUMENT_ROOT': '/htdocs', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': '*/*', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_HOST': 'wsgitest', 'HTTP_USER_AGENT': 'Wget/1.10', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO': '/blog/', 'PATH_TRANSLATED': '/home/blackbird/Developement/WSGIarea/colubrid/trunk/test.cgi/blog/', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '59394', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/blog/', 'SCRIPT_FILENAME': '/home/blackbird/Developement/WSGIarea/colubrid/trunk/test.cgi', 'SCRIPT_NAME': '', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'wsgitest', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '', 'SERVER_SOFTWARE': 'Apache/2.0.54 (Ubuntu) mod_jk/1.2.15 mod_python/3.1.3 Python/2.4.2 PHP/4.4.0-3ubuntu1', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7dfd0b0>, 'wsgi.input': <open file '<stdin>', mode 'r' at 0xb7dfd020>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': True, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)} |
exc_info | (<class exceptions.ZeroDivisionError at 0xb7df4a1c>, <exceptions.ZeroDivisionError instance at 0xb7a8398c>, <traceback object at 0xb7a7f0cc>) |
headers | [('Content-Type', 'text/html')] |
request | <colubrid.request.Request object at 0xb7b73e2c> |
result | <examples.objectapplication.DispatcherApplication object at 0xb7b73d2c> |
self | <colubrid.middlewares.debug.DebuggedApplication object at 0xb7c02d4c> |
start_response | <function start_response at 0xb7b7a41c> |
109 | pass |
110 | |
111 | def process_request(self): |
112 | raise NotImplementedError |
113 | |
114 | def __iter__(self): |
115 | try: |
116 | self.process_request() |
117 | except RequestBreak: |
118 | pass |
119 | except Exception, e: |
120 | if isinstance(e, ColubridException): |
121 | e(self) |
122 | else: |
Name | Value |
---|---|
e | <exceptions.ZeroDivisionError instance at 0xb7a8398c> |
self | <examples.objectapplication.DispatcherApplication object at 0xb7b73d2c> |
221 | # if it forces an redirect the __iter__ method skips the next |
222 | # part. call it magic if you like -.- |
223 | self._fix_slash(handler) |
224 | |
225 | if min_len <= handler_len <= max_len: |
226 | parent = handler.im_class() |
227 | parent.request = self.request |
228 | return handler(parent, *handler_args) |
229 | |
230 | raise PageNotFoundException |
231 | |
232 | def _fix_slash(self, handler): |
233 | """ |
234 | Fixes the trailing slash in an url. |
Name | Value |
---|---|
args | [] |
defaults | () |
handler | <unbound method Blog.index> |
handler_args | [] |
handler_len | 0 |
kwargs | None |
max_len | 0 |
min_len | 0 |
parent | <examples.objectapplication.Blog object at 0xb7a8396c> |
path | ['blog'] |
path_info | '/blog/' |
self | <examples.objectapplication.DispatcherApplication object at 0xb7b73d2c> |
varargs | None |
vargs | None |
31 | self.request.write('<h1>About Hello World</h1><p>...</p>') |
32 | |
33 | |
34 | class Blog(object): |
35 | |
36 | def index(self): |
37 | self.request.write('<h1>Blog Index</h1>') |
38 | 1/0 |
39 | |
40 | def article(self, article_id): |
41 | self.request.write('<h1>Article #%s</h1>' % article_id) |
42 | |
43 | def archive(self, year=None, month=None, day=None): |
44 | this = datetime.now() |
Name | Value |
---|---|
self | <examples.objectapplication.Blog object at 0xb7a8396c> |
The following list contains all important request variables. Click on a header to expand the list.
Name | Value |
---|---|
APPLICATION_REQUEST | '/blog/' |
DOCUMENT_ROOT | '/htdocs' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_CONNECTION | 'Keep-Alive' |
HTTP_HOST | 'wsgitest' |
HTTP_USER_AGENT | 'Wget/1.10' |
PATH | '/usr/local/bin:/usr/bin:/bin' |
PATH_INFO | '/blog/' |
PATH_TRANSLATED | '/home/blackbird/Developement/WSGIarea/colubrid/trunk/test.cgi/blog/' |
QUERY_STRING | '' |
REMOTE_ADDR | '127.0.0.1' |
REMOTE_PORT | '59394' |
REQUEST_METHOD | 'GET' |
REQUEST_URI | '/blog/' |
SCRIPT_FILENAME | '/home/blackbird/Developement/WSGIarea/colubrid/trunk/test.cgi' |
SCRIPT_NAME | '' |
SERVER_ADDR | '127.0.0.1' |
SERVER_ADMIN | '[no address given]' |
SERVER_NAME | 'wsgitest' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.0' |
SERVER_SIGNATURE | '' |
SERVER_SOFTWARE | 'Apache/2.0.54 (Ubuntu) mod_jk/1.2.15 mod_python/3.1.3 Python/2.4.2 PHP/4.4.0-3ubuntu1' |
wsgi.errors | <open file '<stderr>', mode 'w' at 0xb7dfd0b0> |
wsgi.input | <open file '<stdin>', mode 'r' at 0xb7dfd020> |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | True |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
no data given |
---|
no data given |
---|
no data given |
---|
no data given |
---|