Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly inform the user of missing profile snapshots in the profile page #45

Open
MADindustries opened this issue Dec 10, 2018 · 0 comments
Labels

Comments

@MADindustries
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant