jenkins.JenkinsException: Could not parse JSON info for server

Bug #2018563 reported by Michael
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Jenkins
New
Undecided
Unassigned

Bug Description

server=<jenkins.Jenkins object at 0x0000021B636D42E0>
Traceback (most recent call last):
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 822, in get_info
    return json.loads(self.jenkins_open(
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 560, in jenkins_open
    return self.jenkins_request(req, add_crumb, resolve_auth).text
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 576, in jenkins_request
    self.maybe_add_crumb(req)
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 373, in maybe_add_crumb
    response = self.jenkins_open(requests.Request(
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 560, in jenkins_open
    return self.jenkins_request(req, add_crumb, resolve_auth).text
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 579, in jenkins_request
    self._request(req))
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 553, in _request
    return self._session.send(r, **_settings)
  File "C:\Python\Python310\lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python\Python310\lib\site-packages\requests\adapters.py", line 483, in send
    timeout = TimeoutSauce(connect=timeout, read=timeout)
  File "C:\Python\Python310\lib\site-packages\urllib3\util\timeout.py", line 119, in __init__
    self._connect = self._validate_timeout(connect, "connect")
  File "C:\Python\Python310\lib\site-packages\urllib3\util\timeout.py", line 156, in _validate_timeout
    raise ValueError(
ValueError: Timeout value connect was <object object at 0x0000021B60B04CA0>, but it must be an int, float or None.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\code\XXXX.py", line 37, in <module>
    print(server.get_info())
  File "C:\Python\Python310\lib\site-packages\jenkins\__init__.py", line 829, in get_info
    raise JenkinsException("Could not parse JSON info for server[%s]"
jenkins.JenkinsException: Could not parse JSON info for server[http://XXX.XXX.XXX.XXX]

Revision history for this message
Michael (xuri422) wrote :

python-jenkins 1.8.0

Python 3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit (AMD64)] on win32

Revision history for this message
Michael (xuri422) wrote :

I have resolved this problem.

I found the 'requests' is not normally.

When I change the version from '2.30.0' to '2.27.1'. the problem is missing........

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.