Skip to content

Cannot import V1alpha1Api in python 3.7 #4

Closed

Description

@zymergen-luke

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

Activity

  1. CermakM commented on Oct 30, 2019

    @CermakM
    Owner

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

  2. CermakM commented on Oct 30, 2019

    @CermakM
    Owner

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

  3. self-assigned this
    on Oct 30, 2019
  4. zymergen-luke commented on Oct 30, 2019

    @zymergen-luke
    Author

    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.

  5. rosscdh commented on Apr 4, 2020

    @rosscdh

    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)

  6. CermakM commented on Jul 13, 2022

    @CermakM
    Owner

    Closed. No longer maintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions