What problem are you trying to solve with Submitty At present, the router displays bytestrings to the user by default when rendering a sequence diagram.
Describe the way you'd like to solve this problem
Use the python package cchardet to detect message encoding and decode.
Additional context
This issue will require a new docker image submitty_autograding_router to be written. The package should run python and have cchardet installed.
The following code (or equivalent) should replace the sequence_diagram_message_preprocess function. The confidence threshold was chosen arbitrarily and is open to debate.
def sequence_diagram_message_preprocess(self, message):
ret = message
encoding_prediction = chardet.detect(message)
if encoding_prediction['confidence'] > .8:
try:
ret = message.decode(encoding_prediction['encoding'])
except:
pass
return re