king-michael / simulation_database

Apache License 2.0
1 stars 1 forks source link

Bug: request.args['db_path'] -> exceptions.BadRequestKeyError(key) #29

Closed king-michael closed 5 years ago

king-michael commented 5 years ago

When first visiting the view page a error appears, because db_path is not set initially.

Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/micha/SIM-PhD-King/gits/simulation_database/simdb/viewer/app/views.py", line 64, in filter_table
    db_path = request.args['db_path'] # get the path to selected data base
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 431, in __getitem__
    raise exceptions.BadRequestKeyError(key)
BadRequestKeyError: 400 Bad Request: KeyError: 'db_path'
andrejberg commented 5 years ago

old viewer replaced by dashboard