Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Fix custom_encoder imports (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellasmo authored Sep 15, 2022
1 parent 1081640 commit 1d9cf71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codejail/safe_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def flush(self, *args, **kwargs):

the_code.append(textwrap.dedent(
"""
from custom_encoder import GlobalEncoder
from codejail.custom_encoder import GlobalEncoder
g_dict = json_safe(g_dict)
"""
# Write the globals back to the calling process.
Expand Down Expand Up @@ -209,7 +209,7 @@ def decode_object(obj):
if isinstance(obj, bytes):
return obj.decode('utf-8')
if type(obj).__module__ == 'numpy':
from custom_encoder import NumpyEncoder
from codejail.custom_encoder import NumpyEncoder
return NumpyEncoder().default(obj)
if isinstance(obj, (list, tuple)):
new_list = []
Expand Down

0 comments on commit 1d9cf71

Please sign in to comment.