Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
markkuriekkinen opened this issue Feb 14, 2022 · 0 comments
Open

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

markkuriekkinen opened this issue Feb 14, 2022 · 0 comments
Assignees
Labels
area: questionnaire effort: hours The issue seems to be small and should be doable in hours or few days. experience: beginner required knowledge estimate requester: internal The issue is raised by a person inside the A+ team status: scheduled Scheduled for upcoming sprints in EDIT Jira board type: bug This is a bug.

Comments

@markkuriekkinen
Copy link
Contributor

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.'

@markkuriekkinen markkuriekkinen self-assigned this Feb 14, 2022
@markkuriekkinen markkuriekkinen added area: questionnaire effort: hours The issue seems to be small and should be doable in hours or few days. experience: beginner required knowledge estimate requester: internal The issue is raised by a person inside the A+ team status: scheduled Scheduled for upcoming sprints in EDIT Jira board type: bug This is a bug. labels Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: questionnaire effort: hours The issue seems to be small and should be doable in hours or few days. experience: beginner required knowledge estimate requester: internal The issue is raised by a person inside the A+ team status: scheduled Scheduled for upcoming sprints in EDIT Jira board type: bug This is a bug.
Projects
Status: Todo
Development

No branches or pull requests

1 participant