From 6b03d5a7e3ed5716cad1a9c9813be26ffa030d9b Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Wed, 19 Feb 2020 13:55:47 -0800 Subject: [PATCH] SDK - Compiler - Fix incompatibility with python3.5 (#3122) --- sdk/python/kfp/compiler/compiler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/python/kfp/compiler/compiler.py b/sdk/python/kfp/compiler/compiler.py index 20db84ae1ad2..2750518cee60 100644 --- a/sdk/python/kfp/compiler/compiler.py +++ b/sdk/python/kfp/compiler/compiler.py @@ -962,10 +962,11 @@ def _validate_workflow(workflow: dict): import subprocess argo_path = shutil.which('argo') if argo_path: - result = subprocess.run([argo_path, 'lint', '/dev/stdin'], input=yaml_text, encoding='utf-8', stdout=subprocess.PIPE, stderr=subprocess.PIPE) + result = subprocess.run([argo_path, 'lint', '/dev/stdin'], input=yaml_text.encode('utf-8'), stdout=subprocess.PIPE, stderr=subprocess.PIPE) if result.returncode: raise RuntimeError( '''Internal compiler error: Compiler has produced Argo-incompatible workflow. Please create a new issue at https://github.com/kubeflow/pipelines/issues attaching the pipeline code and the pipeline package. -Error: {}'''.format(result.stderr) +Error: {}'''.format(result.stderr.decode('utf-8')) ) +