task instance keeps running when call http url with httpx in PythonOperator #37961
Replies: 4 comments 1 reply
-
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Beta Was this translation helpful? Give feedback.
-
The problem is here . when call BTW , i call this function in shell scripts, and it works well . |
Beta Was this translation helpful? Give feedback.
-
skip proxy bypass check with the follow code: ## try with httpx
with httpx.Client(trust_env=False, timeout=30) as client:
resp = client.get(url=url)
print('resp = ', resp, resp.is_success)
## or with requests
with requests.Session() as session:
session.trust_env = False
resp = session.get(url=url, timeout=30)
print('resp = ', resp) |
Beta Was this translation helpful? Give feedback.
-
I guess you have a Segmentation Fault. Try to set environment variable |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
2.8.2
If "Other Airflow 2 version" selected, which one?
No response
What happened?
I have a PythonOperator in my dag , in the python_callable function calls a http url by using
httpx.get(url)
. when i trigger the dag , the task instance keeps running , and the log stops before httpx.get . and it doesn't raise timeout error .i tried httpx and requests, and got the same problem.
this is my code:
and log like this:
What you think should happen instead?
No response
How to reproduce
the code i provided
Operating System
macOS 13.4.1
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions