CermakM / argo-client-python

Python client for Argo Workflows | Mirrored to https://github.com/argoproj-labs/argo-client-python
https://github.com/argoproj/argo
Apache License 2.0
31 stars 8 forks source link

Cannot import V1alpha1Api in python 3.7 #4

Closed zymergen-luke closed 2 years ago

zymergen-luke commented 4 years ago

I assume it's failing in python 3.5+ when they added the async keyword.

from argo.workflows.client import V1alpha1Api
Traceback (most recent call last):
  File "<redacted>/lib/python3.7/site-packages/argo/workflows/__init__.py", line 3, in <module>
    from argo.workflows import client

  File "<redacted>/lib/python3.7/site-packages/argo/workflows/client/__init__.py", line 19, in <module>
    from argo.workflows.client.api.v1alpha1_api import V1alpha1Api

  File "<redacted>/lib/python3.7/site-packages/argo/workflows/client/api/__init__.py", line 6, in <module>
    from argo.workflows.client.api.v1alpha1_api import V1alpha1Api

  File "<redacted>/lib/python3.7/site-packages/argo/workflows/client/api/v1alpha1_api.py", line 134
    async=params.get('async'),
        ^
SyntaxError: invalid syntax
CermakM commented 4 years ago

Hello! Thanks for the report... Correct, Python 3.6 is fine, but it does fail in 3.7 :/

CermakM commented 4 years ago

Weirdly enough, this should have been fixed in https://github.com/swagger-api/swagger-codegen/pull/8401, so perhaps a version of swagger which does not include this fix has been used to generate the code. Will look into it.

zymergen-luke commented 4 years ago

Thanks! This project looks promising!

I've been experimenting with using the Kubeflow Pipelines SDK to generate the pipeline yaml programmatically, but I don't believe the kubeflow pipeline sdk will communicate with a raw Argo installation (I could be wrong about that). I've been falling back to the argo command line to kick off the jobs generated by the sdk. I'm hoping something like this client will allow us to keep all the logic in code.

rosscdh commented 4 years ago

Having the same issue; I had to manually move the workflows/dsl into the argo/workflows folder (issue with the dist for some weird reasons)

CermakM commented 2 years ago

Closed. No longer maintained.