bro-n-bro / spacebox-api

Flask api for services on top of spacebox
MIT License
4 stars 0 forks source link

Internal server error on query #119

Closed altbro closed 1 year ago

altbro commented 1 year ago
[2023-09-26 15:34:40,937] ERROR in app: Exception on /statistics/apr [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "./main.py", line 391, in apr
    return jsonify({'data': statistics_service.get_apr_by_days(from_date, to_date, detailing), 'name': 'apr'})
  File "/services/statistics.py", line 154, in get_apr_by_days
    from_height = self.db_client.get_min_date_height(from_date).height
AttributeError: 'NoneType' object has no attribute 'height'