File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11from __future__ import absolute_import
2+ import codecs
23import functools
34import io
45import json
@@ -549,14 +550,14 @@ def _job_popen(
549550 stdin_path = stdin_path ,
550551 )
551552 with open (os .path .join (job_dir , "job.json" ), "wb" ) as f :
552- json .dump (job_description , f )
553+ json .dump (job_description , codecs . getwriter ( 'utf-8' )( f ), ensure_ascii = False ) # type: ignore
553554 try :
554555 job_script = os .path .join (job_dir , "run_job.bash" )
555556 with open (job_script , "wb" ) as f :
556557 f .write (job_script_contents .encode ('utf-8' ))
557558 job_run = os .path .join (job_dir , "run_job.py" )
558559 with open (job_run , "wb" ) as f :
559- f .write (PYTHON_RUN_SCRIPT )
560+ f .write (PYTHON_RUN_SCRIPT . encode ( 'utf-8' ) )
560561 sp = subprocess .Popen (
561562 ["bash" , job_script .encode ("utf-8" )],
562563 shell = False ,
You can’t perform that action at this time.
0 commit comments