Skip to content

Commit

Permalink
SDK - Compiler - Fix incompatibility with python3.5 (#3122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun authored Feb 19, 2020
1 parent 4746bdb commit 03e064c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdk/python/kfp/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
)

0 comments on commit 03e064c

Please sign in to comment.