File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import absolute_import
2
+ import codecs
2
3
import functools
3
4
import io
4
5
import json
@@ -549,14 +550,14 @@ def _job_popen(
549
550
stdin_path = stdin_path ,
550
551
)
551
552
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
553
554
try :
554
555
job_script = os .path .join (job_dir , "run_job.bash" )
555
556
with open (job_script , "wb" ) as f :
556
557
f .write (job_script_contents .encode ('utf-8' ))
557
558
job_run = os .path .join (job_dir , "run_job.py" )
558
559
with open (job_run , "wb" ) as f :
559
- f .write (PYTHON_RUN_SCRIPT )
560
+ f .write (PYTHON_RUN_SCRIPT . encode ( 'utf-8' ) )
560
561
sp = subprocess .Popen (
561
562
["bash" , job_script .encode ("utf-8" )],
562
563
shell = False ,
You can’t perform that action at this time.
0 commit comments