-
Notifications
You must be signed in to change notification settings - Fork 2
Description
When these exceptions occur:
Internal Server Error: /profile/part/buffer_up_down_data Traceback (most recent call last): File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response response = self.process_exception_by_middleware(e, request) File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view return view_func(request, *args, **kwargs) File "/mnt/whatmanager/WhatManager2/WhatManager2/utils.py", line 34, in wrapped val = fn(*args, **kwargs) File "/mnt/whatmanager/WhatManager2/what_profile/parts.py", line 29, in buffer_up_down_data prev_point = snapshots[0] IndexError: list index out of range
Traceback (most recent call last): File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response response = self.process_exception_by_middleware(e, request) File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/root/.local/share/virtualenvs/WhatManager2-Ah3zspGh/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view return view_func(request, *args, **kwargs) File "/mnt/whatmanager/WhatManager2/what_profile/parts.py", line 49, in profile_history [since + timedelta(hours=h) for h in range(0, 25)] File "/mnt/whatmanager/WhatManager2/what_profile/parts.py", line 48, in <listcomp> WhatUserSnapshot.get_closest_snapshot(when) for when in File "/mnt/whatmanager/WhatManager2/what_profile/models.py", line 47, in get_closest_snapshot raise WhatUserSnapshot.DoesNotExist() what_profile.models.WhatUserSnapshot.DoesNotExist
This normally results in a blank profile page without any information about the underlying exceptions. We should let the user know that no snapshots exist and provide some helpful direction