Skip to content

Unable to save new tasks #1686

Closed
Closed

Description

@Didayolo

Description

Issue related to saving new tasks in Codabench. The issue is explained step-by-step in this document:
https://docs.google.com/document/d/1-InYnhHznnU0nqGfxfmHKYfSTsLX_klB4V32Uf08SNQ/edit?usp=sharing

Error logs

django-1  | Internal Server Error: /api/competitions/3863/
django-1  | Traceback (most recent call last):
django-1  |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
django-1  |     response = get_response(request)
django-1  |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
django-1  |     response = self.process_exception_by_middleware(e, request)
django-1  |   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
django-1  |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
django-1  |   File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
django-1  |     return view_func(*args, **kwargs)
django-1  |   File "/usr/local/lib/python3.9/site-packages/rest_framework/viewsets.py", line 116, in view
django-1  |     return self.dispatch(request, *args, **kwargs)
django-1  |   File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 495, in dispatch
django-1  |     response = self.handle_exception(exc)
django-1  |   File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 455, in handle_exception
django-1  |     self.raise_uncaught_exception(exc)
django-1  |   File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 492, in dispatch
django-1  |     response = handler(request, *args, **kwargs)
django-1  |   File "/usr/local/lib/python3.9/site-packages/rest_framework/mixins.py", line 84, in partial_update
django-1  |     return self.update(request, *args, **kwargs)
django-1  |   File "/app/src/apps/api/views/competitions.py", line 311, in update
django-1  |     self.perform_update(serializer)
django-1  |   File "/app/src/apps/api/views/competitions.py", line 590, in perform_update
django-1  |     self.run_new_task_submissions(instance.phases.get(pk=phase_id), new_tasks)
django-1  |   File "/app/src/apps/api/views/competitions.py", line 563, in run_new_task_submissions
django-1  |     leaderboard=submission.children.first().leaderboard,
django-1  | AttributeError: 'NoneType' object has no attribute 'leaderboard'

Activity

  1. added
    Competition-specific
    on Nov 28, 2024
  2. shmuhammadd commented on Dec 9, 2024

    @shmuhammadd

    @Didayolo jjust checking in on this!

    We are about to start our evaluation phase and are still facing this issue on our task (https://www.codabench.org/competitions/3863/).

    We tried creating a new Codabench from scratch with all the tasks we wanted, and it worked. However, we don’t want to migrate to a new Codabench as we already have many participants with many submissions (421 registered participants for our task, the largest on Codabench to date).

  3. Didayolo commented on Dec 10, 2024

    @Didayolo
    MemberAuthor

    @ihsaan-ullah May have a clue about this problem. Please keep us updated.

  4. ihsaan-ullah commented on Dec 17, 2024

    @ihsaan-ullah
    Collaborator

    Update

    When you update a competition by adding a new task to a phase, the following happens:

    • we fetch all submissions that are parent submissions
    • we loop over all these submissions and we find missing tasks (missing task = all_tasks_of_this_phase - submission.children.tasks).
    • we then create a new submission which is a child submission with this new task or missing task
    • Problem occurs in the leaderboard assigning
    leaderboard=submission.children.first().leaderboard

    Error says AttributeError: 'NoneType' object has no attribute 'leaderboard'. children.first is None. I am checking why it is None

  5. ihsaan-ullah commented on Feb 20, 2025

    @ihsaan-ullah
    Collaborator

    I tired to debug this problem using the following steps:

    1. Uploaded a new competition
    2. Added 2 tasks to the final phase (Dev Task and Final Task)
    3. Ran 2 submissions (one on dev task only, second on the 2 tasks)
    4. Added a new task to the phase and everything went well without any problem

    Do you know how to reproduce this issue?

  6. Didayolo commented on Mar 21, 2025

    @Didayolo
    MemberAuthor

    Unfortunately we are still not understanding this bug. Especially as we can't reproduce it, it is just stuck to the first version of the challenge.

  7. Didayolo commented on Apr 23, 2025

    @Didayolo
    MemberAuthor

    I close this issue as it is too specific and staling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCompetition-specific

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions