# Jenkins returns HTTPError 503 to Python script

**URL:** <https://community.jenkins.io/t/jenkins-returns-httperror-503-to-python-script/9301>\
**Category:** Community\
**Created:** [August 30, 2023, 3:38pm UTC](https://community.jenkins.io/t/jenkins-returns-httperror-503-to-python-script/9301 "2023-08-30T15:38:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marklenders](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@marklenders](https://community.jenkins.io/u/marklenders)\
**Post date:** [August 30, 2023, 3:38pm UTC](https://community.jenkins.io/t/jenkins-returns-httperror-503-to-python-script/9301/1 "2023-08-30T15:38:35Z")

</div>

Hello everyone,  
I have the following problem:  
from a Python script I make a call to Jenkins to execute a Job:  
resp = requests.post(url, data=data, auth=(username, password))  
resp.raise\_for\_status()

In most cases everything works correctly but sometimes it happens that raise\_for\_status returns me the error:  
requests.exceptions.HTTPError: 503 Server Error: Proxy Error for url: [https://jenkins](https://jenkins)…

In all the cases so far, the pipeline on Jenkins started correctly but the Python script failed me because it received back that error 503

Has this ever happened to you guys?
