ValueError: Expected shape (168, 1)
File "portal/hackathons/services.py", line 174, in submission
is_valid = glob["validate"](y_true, y_pred)
File "<string>", line 39, in validate
ValidationError: Error validating data
File "portal/hackathons/views.py", line 148, in post
hackathon, request.user, request.FILES["data"]
File "portal/hackathons/services.py", line 176, in submission
raise ValidationError("Error validating data") from exc
The view is expecting that when it tries to validate the student submission, a django.core.exceptions.ValidationError might occur.
The view calls the submission service, which when it validates the submission, raises a custom class ValidationError, instead of the django.core.exceptions.ValidationError that the view was expecting
this makes the view think that a completely different exception occurred, when in reality, we're just using the wrong class
Fix
in the submission service, use django.core.exceptions.ValidationErrorinstead of the custom class ValidationError
https://sentry.io/organizations/ldsa/issues/2711523277/?project=1450635&statsPeriod=30d