Issue running coinflip.py example workflow with Hera and Argo #576
-
I am trying to run a workflow using Hera, with the code available at https://github.com/argoproj-labs/hera/blob/main/examples/workflows/coinflip.py. I have installed Hera and its dependencies using pip, and when I run the code using python coinflip.py, there is no error reported in the console. However, when I check the Argo list using I have verified that Argo is correctly installed, and I have also tried running other workflows directly on the Argo UI, which are successfully displayed. It seems that the issue is specific to the workflow created with Hera. Here is my pip freeze output:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
I did some further research and found that curl -k --request GET --url https://localhost:2746/api/v1/workflows/argo/hello-world-sm789 works, indicating that the issue may be specific to Hera. Additionally, I found that Hera v4.4.2 works, but Hera v5 does not. Could someone please help me troubleshoot this issue with Hera v5 and get the workflow to run on Argo? |
Beta Was this translation helpful? Give feedback.
-
Hi @tavallaie! As a double check, did you add the |
Beta Was this translation helpful? Give feedback.
-
Problem: When I tried to run w.create() in my code, I received an AssertionError with the message "workflow namespace not defined". When I added a namespace to my code, such as "argo", I received a new error message: requests.exceptions.MissingSchema: Invalid URL 'api/v1/workflows/argo': No scheme supplied. Perhaps you meant https://api/v1/workflows/argo?. I have attempted various solutions over the past few days, but I have been unable to successfully run my pipeline. Additional information: I am currently able to run my pipelines with Hera v4.4.2. |
Beta Was this translation helpful? Give feedback.
-
@flaviuvadan, I wanted to share a tip I learned the hard way when working with the requests library. In the following code:
If you don't include the protocol in the base URL, To avoid this, make sure to include the protocol in the base URL, like so: |
Beta Was this translation helpful? Give feedback.
Hi @tavallaie! As a double check, did you add the
w.create()
call in the coinflip example? We do not add that in the examples because we don't have AW running in CI at the moment, so when we test the examples we only import thew
, generate the YAML, and compare to the upstream (official) Argo Workflows YAML examples to make sure Hera works correctly