与JIRA python连接时出现问题 [英] Issue in connecting with JIRA python

查看:167
本文介绍了与JIRA python连接时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在python中使用JIRA身份验证:

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))

代码不正确,我只想说明调用JIRA API的方式.

The code is not correct, I just want to show the way I call the JIRA API.

我收到以下错误消息:

警告:root:EOF在执行GET

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}]

警告:root:从GET https://jira.nutanix获取可恢复的错误. com/rest/api/2/serverInfo ,将在10秒内重试1/3.错误:发生EOF违反协议(_ssl.c:590) 追溯(最近一次通话):

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):

对此有任何帮助吗?我在macOS 10.11上

Any help on this? I'm on macOS 10.11

完整追溯:

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

KeyboardInterrupt

推荐答案

请尝试

sudo apt-get install libffi-dev
sudo pip install -U requests[security]

来源: Python请求request.exceptions.SSLError:[Errno 8] _ssl.c:504:发生了违反协议的EOF

这篇关于与JIRA python连接时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆