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 - Error 500 #1508

Closed ObadaS closed 4 months ago

ObadaS commented 4 months ago

image

Internal Server Error: /server_status
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/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.8/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.8/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 158, in get
    context = self.get_context_data(**kwargs)
  File "/app/src/apps/pages/views.py", line 92, in get_context_data
    submission.file_size = self.format_file_size(submission.data.file_size)
  File "/app/src/apps/pages/views.py", line 113, in format_file_size
    n = float(file_size)
TypeError: float() argument must be a string or a number, not 'NoneType'
Internal Server Error: /server_status
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/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.8/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.8/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 158, in get
    context = self.get_context_data(**kwargs)
  File "/app/src/apps/pages/views.py", line 92, in get_context_data
    submission.file_size = self.format_file_size(submission.data.file_size)
  File "/app/src/apps/pages/views.py", line 113, in format_file_size
    n = float(file_size)
TypeError: float() argument must be a string or a number, not 'NoneType'

I tried restarting all the containers, the issue somehow persisted.

ihsaan-ullah commented 4 months ago

I think the problem is coming from the Value Error in except. It should be a generic exception or typeError https://github.com/codalab/codabench/blob/3eedc7ae608848f90defc3d84e4b944c32ed16a3/src/apps/pages/views.py#L114

ObadaS commented 4 months ago

I am wondering why this problem seems to have appeared out of nowhere. And why it survived a restart.

ObadaS commented 4 months ago

The problem appears to have fixed itself for now, I can load the Server Status page again.

ihsaan-ullah commented 4 months ago

It is fixed because that submission with file size problem is 3 days old and we only show 2 days old submissions

Didayolo commented 4 months ago

I am still encountering this problem

ObadaS commented 4 months ago

@Didayolo It was fine this morning but came back a few hours ago. As @ihsaan-ullah said, as long as there is a submission with the problematic file size, it will cause this error.

Didayolo commented 4 months ago

Tested and merged: #1512