Reputation: 397
I am using JIRA authentication in python:
from jira.client import JIRA
option={'server':'https://jira.nutanix.com/','verify':False}
jira_obj=JIRA(options=options, basic_auth=(user, password))
The code is not correct, I just want to show the way I call the JIRA API.
I am getting error as:
WARNING:root:EOF occurred in violation of protocol (_ssl.c:590) while doing GET https://jira.nutanix.com/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'User-Agent': 'python-requests/2.10.0', 'Connection': 'keep-alive', u'X-Atlassian-Token': u'no-check', u'Cache-Control': u'no-cache', u'Content-Type': u'application/json'}, 'params': None}]
WARNING:root:Got recoverable error from GET https://jira.nutanix.com/rest/api/2/serverInfo, will retry [1/3] in 10s. Err: EOF occurred in violation of protocol (_ssl.c:590) Traceback (most recent call last):
Any help on this? I'm on macOS 10.11
Full traceback:
Traceback (most recent call last):
File "/Users/syam.mohan/PycharmProjects/cluster_busy/gold_closer.py", line 25, in <module>
print connect_jira('syam.mohan','pwd',option)
File "/Users/syam.mohan/PycharmProjects/cluster_busy/gold_closer.py", line 12, in connect_jira
jira = JIRA('https://jira.nutanix.com/',basic_auth=(user, password))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jira/client.py", line 261, in __init__
si = self.server_info()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/jira/client.py", line 1619, in server_info
return self._get_json('serverInfo')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/jira/client.py", line 2035, in _get_json
r = self._session.get(url, params=params)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jira/resilientsession.py", line 130, in get
return self.__verb('GET', url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/jira/resilientsession.py", line 116, in __verb
if self.__recoverable(response_or_exception, url, verb.upper(), retry_number):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jira/resilientsession.py", line 88, in __recoverable
time.sleep(delay)
KeyboardInterrupt
Upvotes: 1
Views: 1684
Reputation: 2891
Please try
sudo apt-get install libffi-dev
sudo pip install -U requests[security]
Upvotes: 2