okfn/openhdi — Issue #1: 500 Internal Server Error
Author: MindJuices
Created: 2011-12-19 01:47:19+00:00
State: open

Hello all,

I have downloaded the code and tried to get it to build correctly but to no avail. Well, I shouldn't say build, as I have gotten it to build but I haven't been able to render it. I have everything installed correctly, as evidence of it able to be built. When the address http://127.0.0.1:5000/ is render in a browser the error occurs. See error code below.

root@DocWoodside:~/Desktop/OKFN/okfn-openhdi# python openhdi/app.py
openhdi/app.py:46: DeprecationWarning: Modules are deprecated. Upgrade to using blueprints. Have a look into the documentation for more information. If this module was registered by a Flask-Extension upgrade the extension or contact the author of that extension instead. (Registered )
app.register_module(api, url_prefix='/api')

* Running on http://127.0.0.1:5000/
-- When I load this address in the browser I get a 500 Internal Server Error

/usr/local/lib/python2.6/dist-packages/openhdi-0.1-py2.6.egg/openhdi/app.py:46: DeprecationWarning: Modules are deprecated. Upgrade to using blueprints. Have a look into the documentation for more information. If this module was registered by a Flask-Extension upgrade the extension or contact the author of that extension instead. (Registered )
app.register_module(api, url_prefix='/api')
/usr/local/lib/python2.6/dist-packages/Flask_Genshi-0.5.1-py2.6.egg/flaskext/genshi.py:164: DeprecationWarning: Flask.modules is deprecated, use Flask.blueprints instead
modules = getattr(self.app, 'modules', {})
127.0.0.1 - - [18/Dec/2011 20:36:25] "GET / HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/Werkzeug-0.8.2-py2.6.egg/werkzeug/serving.py", line 159, in run_wsgi
execute(app)
File "/usr/local/lib/python2.6/dist-packages/Werkzeug-0.8.2-py2.6.egg/werkzeug/serving.py", line 146, in execute
application_iter = app(environ, start_response)
File "/usr/local/lib/python2.6/dist-packages/Flask-0.8-py2.6.egg/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.6/dist-packages/Flask-0.8-py2.6.egg/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.6/dist-packages/Flask-0.8-py2.6.egg/flask/app.py", line 1197, in handle_exception
return handler(e)
File "/home/david/Desktop/OKFN/okfn-openhdi/openhdi/app.py", line 69, in apperror
return render_response('error.html', values)
File "/usr/local/lib/python2.6/dist-packages/Flask_Genshi-0.5.1-py2.6.egg/flaskext/genshi.py", line 278, in render_response
template = render_template(template, context, method, string, filter)
File "/usr/local/lib/python2.6/dist-packages/Flask_Genshi-0.5.1-py2.6.egg/flaskext/genshi.py", line 266, in render_template
return template.render(**render_args)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/core.py", line 179, in render
return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 60, in encode
return _encode(u''.join(list(iterator)))
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 425, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 753, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 592, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 698, in __call__
for kind, data, pos in chain(stream, [(None, None, None)]):
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 532, in __call__
for ev in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/core.py", line 283, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 569, in _include
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/markup.py", line 245, in _match
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 543, in _exec
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 520, in _eval
result = _eval_expr(data, ctxt, **vars)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 286, in _eval_expr
retval = expr.evaluate(ctxt)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/eval.py", line 180, in evaluate
return eval(self.code, _globals, {'__data__': data})
File "/home/david/Desktop/OKFN/okfn-openhdi/openhdi/templates/layout.html", line 25, in

File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/eval.py", line 321, in lookup_attr
val = cls.undefined(key, owner=obj)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/eval.py", line 405, in undefined
raise UndefinedError(key, owner=owner)
UndefinedError: has no member named "user_id"
127.0.0.1 - - [18/Dec/2011 20:36:25] "GET /favicon.ico HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/Werkzeug-0.8.2-py2.6.egg/werkzeug/serving.py", line 159, in run_wsgi
execute(app)
File "/usr/local/lib/python2.6/dist-packages/Werkzeug-0.8.2-py2.6.egg/werkzeug/serving.py", line 146, in execute
application_iter = app(environ, start_response)
File "/usr/local/lib/python2.6/dist-packages/Flask-0.8-py2.6.egg/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.6/dist-packages/Flask-0.8-py2.6.egg/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.6/dist-packages/Flask-0.8-py2.6.egg/flask/app.py", line 1197, in handle_exception
return handler(e)
File "/home/david/Desktop/OKFN/okfn-openhdi/openhdi/app.py", line 69, in apperror
return render_response('error.html', values)
File "/usr/local/lib/python2.6/dist-packages/Flask_Genshi-0.5.1-py2.6.egg/flaskext/genshi.py", line 278, in render_response
template = render_template(template, context, method, string, filter)
File "/usr/local/lib/python2.6/dist-packages/Flask_Genshi-0.5.1-py2.6.egg/flaskext/genshi.py", line 266, in render_template
return template.render(**render_args)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/core.py", line 179, in render
return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 60, in encode
return _encode(u''.join(list(iterator)))
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 425, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 753, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 592, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 698, in __call__
for kind, data, pos in chain(stream, [(None, None, None)]):
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/output.py", line 532, in __call__
for ev in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/core.py", line 283, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 569, in _include
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/markup.py", line 245, in _match
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 543, in _exec
for event in stream:
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 520, in _eval
result = _eval_expr(data, ctxt, **vars)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/base.py", line 286, in _eval_expr
retval = expr.evaluate(ctxt)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/eval.py", line 180, in evaluate
return eval(self.code, _globals, {'__data__': data})
File "/home/david/Desktop/OKFN/okfn-openhdi/openhdi/templates/layout.html", line 25, in

File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/eval.py", line 321, in lookup_attr
val = cls.undefined(key, owner=obj)
File "/usr/local/lib/python2.6/dist-packages/Genshi-0.5.1-py2.6-linux-i686.egg/genshi/template/eval.py", line 405, in undefined
raise UndefinedError(key, owner=owner)
UndefinedError: has no member named "user_id"

Thanks,
David Rogers