Skip to content

MOOC-Grader crashes on loading an exercise model solution #129

@markkuriekkinen

Description

@markkuriekkinen

grader.cs crashes when loading this exercise model solution:

https://plus.cs.aalto.fi/tietotekniikka-sovelluksissa/2022/python1/python-harjoitukset-1/python1_python-harjoitukset-1_repl/info/model/

Is there a mistake in the course configuration or is the course build producing invalid config? The ValueError is suspicious since valid data should not have "2." (NB. period) in an integer field.

File "/mooc-grader/./access/types/forms.py", line 467, in compare_values
return int(val) == int(cmp)
ValueError: invalid literal for int() with base 10: '2.'

From grader.cs log:

[2022-01-07 13:17:12,809: ERROR/log] Internal Server Error: /model/215/python1_python-harjoitukset-1_repl/
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/dist-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/dist-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/dist-packages/aplus_auth/auth/django.py", line 61, in wrapper
return func(request, *args, **kwargs)
File "/mooc-grader/./access/views.py", line 317, in exercise_model
response = import_named(course, exercise['view_type'] + "Model")(request, course, exercise, parameter)
File "/mooc-grader/access/types/stdsync.py", line 160, in createFormModel
points,error_groups,error_fields = form.grade()
File "/mooc-grader/./access/types/forms.py", line 444, in grade
i, ok, p = self.grade_field(i, field)
File "/mooc-grader/./access/types/forms.py", line 579, in grade_field
ok, hints, method = self.grade_text(configuration, value)
File "/mooc-grader/./access/types/forms.py", line 785, in grade_text
correct = self.compare_values(method, value, accept)
File "/mooc-grader/./access/types/forms.py", line 467, in compare_values
return int(val) == int(cmp)
ValueError: invalid literal for int() with base 10: '2.'

Metadata

Metadata

Labels

area: questionnaireeffort: hoursThe issue seems to be small and should be doable in hours or few days.experience: beginnerrequired knowledge estimaterequester: internalThe issue is raised by a person inside the A+ teamstatus: scheduledScheduled for upcoming sprints in EDIT Jira boardtype: bugThis is a bug.

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions