Unclear error when updating a names_for_user variable in correct_code
- Dominant language
- Python
- Stars
- 435
- Forks
- 124
- Avg merge
- 5h 40m
- Merged PRs (30d)
- 14
Description
If you try to update and then use a variable in correct_code that came from names_for_user, the grading code will raise an error telling you that the variable is unbound. It is easy to work around once you know what is happening, but if the system does not want the correct_code section to modify these variables, it would at least be helpful to have a more clear error message.
This does not happen when students try to modify the given variables in their code.
The attached file is a simple example of code that breaks.
[bad_code.txt](https://github.com/inducer/relate/files/959184/bad_code.txt)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure using the attached bad_code.txt example, focusing on a variable from names_for_user that is updated and then used in correct_code. Trace the grading path that reports the variable as unbound and make the resulting error explain this situation clearly; verify that modifying given variables retains its current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100