rufuspollock-okfn / yourtopia

Web app for crowdsourcing preferences about index weighting such as the Human Development Index. Powers the YourTopia site - Global Development beyond GDP.
http://yourtopia.net/
14 stars 9 forks source link

500 Internal Server Error #1

Closed doclrogers closed 12 years ago

doclrogers commented 12 years ago

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 <flask.module.Module object at 0xa744e8c>) app.register_module(api, url_prefix='/api')

/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 <flask.module.Module object at 0xa744e8c>) 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 <Expression u'g.user_id'> 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: <flask.ctx._RequestGlobals object at 0xa7e1f8c> 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 <Expression u'g.user_id'> 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: <flask.ctx._RequestGlobals object at 0xabe856c> has no member named "user_id"

Thanks, David Rogers

rufuspollock commented 12 years ago

@MindJuices: You've got mongodb installed and running right?

doclrogers commented 12 years ago

Yes, I have all the necessary modules and extensions running correctly, including mongodb.

rufuspollock commented 12 years ago

@MindJuices: OK, i'm going to take a look in more detail. In any case we wish to switch to SQL and SQLAlchemy in the backend (see #2). Perhaps you could take a look at that :-)

rufuspollock commented 12 years ago

Closing as no further info and we have dropped mongodb for YourTopia v2.