codalab / codabench

Codabench is a flexible, easy-to-use and reproducible benchmarking platform. Check our paper at Patterns Cell Press https://hubs.li/Q01fwRWB0
Apache License 2.0
76 stars 28 forks source link

Server status return Server error 500 when not logged in #1496

Closed Didayolo closed 5 months ago

Didayolo commented 5 months ago

Server status return Server error 500 when not logged in

Capture d’écran 2024-06-20 à 16 30 36

Relevant files:

Logs:

codabench-django-1       | Internal Server Error: /server_status
codabench-django-1       | Traceback (most recent call last):
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
codabench-django-1       |     response = get_response(request)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
codabench-django-1       |     response = self.process_exception_by_middleware(e, request)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
codabench-django-1       |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 71, in view
codabench-django-1       |     return self.dispatch(request, *args, **kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 97, in dispatch
codabench-django-1       |     return handler(request, *args, **kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 158, in get
codabench-django-1       |     context = self.get_context_data(**kwargs)
codabench-django-1       |   File "/app/src/apps/pages/views.py", line 67, in get_context_data
codabench-django-1       |     qs = qs.filter(
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 892, in filter
codabench-django-1       |     return self._filter_or_exclude(False, *args, **kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 910, in _filter_or_exclude
codabench-django-1       |     clone.query.add_q(Q(*args, **kwargs))
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1290, in add_q
codabench-django-1       |     clause, _ = self._add_q(q_object, self.used_aliases)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1310, in _add_q
codabench-django-1       |     child_clause, needed_inner = self._add_q(
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1315, in _add_q
codabench-django-1       |     child_clause, needed_inner = self.build_filter(
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1224, in build_filter
codabench-django-1       |     self.check_related_objects(join_info.final_field, value, join_info.opts)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1086, in check_related_objects
codabench-django-1       |     for v in value:
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/utils/functional.py", line 257, in inner
codabench-django-1       |     return func(self._wrapped, *args)
codabench-django-1       | TypeError: 'AnonymousUser' object is not iterable
codabench-django-1       | Internal Server Error: /server_status
codabench-django-1       | Traceback (most recent call last):
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
codabench-django-1       |     response = get_response(request)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
codabench-django-1       |     response = self.process_exception_by_middleware(e, request)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
codabench-django-1       |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 71, in view
codabench-django-1       |     return self.dispatch(request, *args, **kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 97, in dispatch
codabench-django-1       |     return handler(request, *args, **kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 158, in get
codabench-django-1       |     context = self.get_context_data(**kwargs)
codabench-django-1       |   File "/app/src/apps/pages/views.py", line 67, in get_context_data
codabench-django-1       |     qs = qs.filter(
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 892, in filter
codabench-django-1       |     return self._filter_or_exclude(False, *args, **kwargs)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 910, in _filter_or_exclude
codabench-django-1       |     clone.query.add_q(Q(*args, **kwargs))
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1290, in add_q
codabench-django-1       |     clause, _ = self._add_q(q_object, self.used_aliases)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1310, in _add_q
codabench-django-1       |     child_clause, needed_inner = self._add_q(
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1315, in _add_q
codabench-django-1       |     child_clause, needed_inner = self.build_filter(
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1224, in build_filter
codabench-django-1       |     self.check_related_objects(join_info.final_field, value, join_info.opts)
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1086, in check_related_objects
codabench-django-1       |     for v in value:
codabench-django-1       |   File "/usr/local/lib/python3.9/site-packages/django/utils/functional.py", line 257, in inner
codabench-django-1       |     return func(self._wrapped, *args)
codabench-django-1       | TypeError: 'AnonymousUser' object is not iterable
Didayolo commented 5 months ago

Fixed by #1497