from ZenDesk 91873 and ZenDesk 86186:
Pre-processing student submissions using add_input_check() hasn't worked since xqueuewatcher was upgraded to Python 3. It appears that the tokenizer is not working, probably due to an encoding issue.
|
def _tokens(code): |
|
""" |
|
A wrapper around tokenize.generate_tokens. |
|
""" |
|
# Protect against pathological inputs: http://bugs.python.org/issue16152 |
|
code = code.rstrip() + "\n" |
|
if isinstance(code, six.text_type): |
|
code = code.encode('utf8') |
|
code = "# coding: utf8\n" + code |
|
toks = tokenize.generate_tokens(six.BytesIO(code).readline) |
|
return toks |
from ZenDesk 91873 and ZenDesk 86186:
Pre-processing student submissions using
add_input_check()hasn't worked since xqueuewatcher was upgraded to Python 3. It appears that the tokenizer is not working, probably due to an encoding issue.xqueue-watcher/grader_support/gradelib.py
Lines 236 to 246 in a95cc96