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

Storage Analytics: Competitions and Users usage not loading #1577

Open
ObadaS opened this issue Sep 4, 2024 · 0 comments · May be fixed by #1585
Open

Storage Analytics: Competitions and Users usage not loading #1577

ObadaS opened this issue Sep 4, 2024 · 0 comments · May be fixed by #1585
Assignees

Comments

@ObadaS
Copy link
Collaborator

ObadaS commented Sep 4, 2024

Hello,

After the fix of #1451, the Usage history of codabench.org starting working again. However, when going to the Competitions or Users Usage tabs, we get an error saying : Could not load storage analytics data
I found some logs in the Django container (nothing in site worker):

Internal Server Error: /api/analytics/users_usage/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 495, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 455, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 492, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/decorators.py", line 54, in handler
    return func(*args, **kwargs)
  File "/app/src/apps/api/views/analytics.py", line 277, in users_usage
    'name': su['user__username'] + " (" + su['user__email'] + ")",
TypeError: can only concatenate str (not "NoneType") to str
Internal Server Error: /api/analytics/users_usage/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 495, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 455, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 492, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/decorators.py", line 54, in handler
    return func(*args, **kwargs)
  File "/app/src/apps/api/views/analytics.py", line 277, in users_usage
    'name': su['user__username'] + " (" + su['user__email'] + ")",
TypeError: can only concatenate str (not "NoneType") to str

This error appears when trying to load the Competitions Usage or Users Usage tabs.

@OhMaley OhMaley linked a pull request Sep 16, 2024 that will close this issue
7 tasks
@Didayolo Didayolo linked a pull request Sep 16, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants