Bug #7562
closedInternal server error in timeline if there are no events in a timeslot
100%
Description
The following error appeared:
Message type: CRITICAL Location: /var/mentat/venv/lib/python3.7/site-packages/vial/app.py:414 Module: app Function: eh_internal_server_error Time: 2022-02-28 06:14:30,459 Message: INTERNAL SERVER ERROR Request: /timeline/search?dt_from=2022-02-21+00%3A00%3A00&dt_to=2022-02-28+07%3A00%3A00&source_addrs=&source_ports=&limit=100&submit=Search Traceback: Traceback (most recent call last): File "/var/mentat/venv/lib/python3.7/site-packages/mentat/stats/idea.py", line 484, in aggregate_dbstats_events idx = bucket_dict[res.bucket] KeyError: datetime.datetime(2022, 2, 23, 0, 30) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "/var/mentat/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/var/mentat/venv/lib/python3.7/site-packages/flask_login/utils.py", line 272, in decorated_view return func(*args, **kwargs) File "/var/mentat/venv/lib/python3.7/site-packages/flask/views.py", line 89, in view return self.dispatch_request(*args, **kwargs) File "/var/mentat/venv/lib/python3.7/site-packages/vial/view/__init__.py", line 1061, in dispatch_request self.do_after_search() File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/timeline/__init__.py", line 269, in do_after_search self.response_context['statistics'] File "/var/mentat/venv/lib/python3.7/site-packages/mentat/stats/idea.py", line 495, in aggregate_dbstats_events str(res.set) AttributeError: 'Record' object has no attribute 'set'
The cause of the first exception is that one of the timeslots does not cover any events, that could be easily mitigated by get()
. The second exception should be investigated however, it may uncover some deeper problem.
Updated by Jan Mach almost 3 years ago
To replicate try upper threshold in near future, for example 15 minutes.
Updated by Radko Krkoš over 2 years ago
- Assignee changed from Jan Mach to Jakub Maloštik
- Target version changed from Backlog to 2.11
Updated by Rajmund Hruška over 1 year ago
Jakub Maloštik is this one finished already or still in progress? I can see one commit - 1b22d07c.
Updated by Jakub Maloštik over 1 year ago
Rajmund Hruška wrote in #note-4:
Jakub Maloštik is this one finished already or still in progress? I can see one commit - 1b22d07c.
The commit only fixed the error meassage, I wasn't able to figure out what the cause of the problem was. However commits for the issue #6413 will close this issue, since they remove the code causing this error completely.
Updated by Jakub Maloštik over 1 year ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset mentat-ng|5ecf68cf575d3fc9b5e35fcf9b2bb993b1b7e353.
Updated by Rajmund Hruška over 1 year ago
- Status changed from Resolved to In Review
Updated by Rajmund Hruška over 1 year ago
- Status changed from In Review to Closed