CottageLabs/idfind — Issue #20: UnboundLocalError: implicit_key referenced before assignment
Author: emanuil-tolev
Created: 2012-03-05 14:58:07+00:00
State: open

A little bug:

127.0.0.1 - - [05/Mar/2012 14:42:07] "GET /favicon.ico HTTP/1.1" 500 -
Traceback (most recent call last):
File "C:\Python\lib\site-packages\flask\app.py", line 1306, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Python\lib\site-packages\flask\app.py", line 1294, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "C:\Python\lib\site-packages\flask\app.py", line 1292, in wsgi_app
response = self.full_dispatch_request()
File "C:\Python\lib\site-packages\flask\app.py", line 1062, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Python\lib\site-packages\flask\app.py", line 1060, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Python\lib\site-packages\flask\app.py", line 1047, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\Users\eet10\Desktop\cl\idfind\idfind\web.py", line 254, in search
io = dosearch(path.replace(".json",""))
File "C:\Users\eet10\Desktop\cl\idfind\idfind\web.py", line 289, in dosearch
if implicit_key:
UnboundLocalError: local variable 'implicit_key' referenced before assignment

Seems to appear when the browser tries a favicon request. Severely pollutes the log however, and makes debugging via the simple means of

print whatever # will print it during the processing of each request by web.py

a big pain if each request also makes it spew an 18-line error.