# Issue with python jenkins api library

**URL:** <https://community.jenkins.io/t/issue-with-python-jenkins-api-library/3377>\
**Category:** Ask a question\
**Tags:** question, python\
**Created:** [August 16, 2022, 12:11pm UTC](https://community.jenkins.io/t/issue-with-python-jenkins-api-library/3377 "2022-08-16T12:11:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YodHao](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/yodhao/32/2072_2.png) [@YodHao](https://community.jenkins.io/u/YodHao)\
**Post date:** [August 16, 2022, 12:11pm UTC](https://community.jenkins.io/t/issue-with-python-jenkins-api-library/3377/1 "2022-08-16T12:11:19Z")

</div>

I would like to ask, when I use python to call jenkinsapi, when I use the get\_jobs method to get the job details, it returns an error and the target computer actively rejects it, and the address I request is not the same as the address output by the console (for example: the one I requested It happened 10.100.100.21, but it returned 10.100.100.20-- (the address 20 was the address I used when I called the api for the first time)), then I tried to clear the cache of pycharm and found that the same problem was reported. , I’m a little confused.

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [August 16, 2022, 3:52pm UTC](https://community.jenkins.io/t/issue-with-python-jenkins-api-library/3377/2 "2022-08-16T15:52:50Z")

</div>

I don’t understand this question.

Can you show the code you are using to call it, and what error your getting, and why a different ip matters?

---

<div class="post-metadata">

**Author:** ![YodHao](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/yodhao/32/2072_2.png) [@YodHao](https://community.jenkins.io/u/YodHao)\
**Post date:** [August 17, 2022, 6:18am UTC](https://community.jenkins.io/t/issue-with-python-jenkins-api-library/3377/3 "2022-08-17T06:18:23Z")

</div>

![微信图片_20220817141449](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/1/136d8178a227c8bfefabd76bcf96833d4faec495.jpeg)  
Hello, the picture is my code. I use the domain name to resolve and call it through the api. The address I hit mosaic below is the wrong address. The address below is 221.122.92.199, but it should be 221.122. 92.198

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [August 17, 2022, 3:24pm UTC](https://community.jenkins.io/t/issue-with-python-jenkins-api-library/3377/4 "2022-08-17T15:24:29Z")

</div>

So not going to be a lot of help, but I notice

`Privoxy` in your error message. Is this possibly something your proxy is returning? Do you need to go through the proxy to your jenkins? You might need to set NO\_PROXY env variable or something

Secondly, it looks like the jenkinsapi project is external to the jenkins project. [GitHub - pycontribs/jenkinsapi: A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers](https://github.com/pycontribs/jenkinsapi) and that it may not be [active anymore](https://github.com/pycontribs/jenkinsapi/issues/811)

---

<div class="post-metadata">

**Author:** ![steved](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/steved/32/2026_2.png) [@steved](https://community.jenkins.io/u/steved)\
**Post date:** [August 23, 2022, 2:26am UTC](https://community.jenkins.io/t/issue-with-python-jenkins-api-library/3377/5 "2022-08-23T02:26:25Z")

</div>

If you paste the full traceback here we might be better able to understand what is happening.

Is the issue really that your DNS is returning incorrect results? python requests module is simply going to use what ever the local dns resolution is.
