Skip to content

Codejail remote_exec fails to serialize bytes #1016

@timmc-edx

Description

@timmc-edx

send_safe_exec_request_v0 in edxapp's remote_exec.py is raising builtins.TypeError: Object of type bytes is not JSON serializable in some cases when attempting to serialize data for the codejail API. (Just a handful in the past few days). This occurs in the statement payload = json.dumps(data).

Likely this is a preexisting issue with the codejail api client, but we should investigate. (We probably need to call codejail's json_safe function—or find out what's passing in bytes objects.)

Acceptance criteria:

  • Stop seeing logs matching env:prod service:edx-edxapp-lms "safe_exec.py" "TypeError: Object of type bytes is not JSON serializable"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done - Long Term Storage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions