我对 Python 世界还很陌生。刚刚阅读了一些文档并想要开始。
我想设计一个用 Python 编写的工具,从 JIRA 中提取已由我们的 QA 团队标记为已解决的问题,然后显示每个版本中错误修复的漂亮 html 报告。
我试图了解从 Python 连接到 JIRA 的机制,但事情还没有弄清楚。
我已经安装了:jira-python-lib http://jira-python.readthedocs.org/en/latest/但是当我尝试建立连接时,出现错误。
# /usr/bin/python
from jira.client import JIRA
jira_options={'server': 'https://xxxxxxxx.atlassian.net'}
jira=JIRA(options=jira_options,basic_auth=('xxxxxxx','xxxxxx'))
如果我执行上面的代码,它会给出以下错误消息:
Traceback (most recent call last):
File "test1.py", line 9, in <module>
jira=JIRA(options=jira_options,basic_auth=('*****','****'))
File "C:\Python27\lib\site-packages\jira\client.py", line 88, in __init__
self._create_http_basic_session(*basic_auth)
File "C:\Python27\lib\site-packages\jira\client.py", line 1368, in _create_htt
p_basic_session
hooks={'args': self._add_content_type})
TypeError: session() takes no arguments (2 given)
有人可以告诉我我在这里做错了什么吗?
另外,我在以下位置找不到任何信息JIRA-DOC https://confluence.atlassian.com/display/JIRA052/JIRA+Documentation关于自动化。
有人可以指导一下这方面的有用文档吗?
发现我需要启用身份验证启用基本身份验证 https://confluence.atlassian.com/display/JIRA/Configuring+Basic+HTTP+Authentication+for+an+Application+Link为了使这项工作顺利进行。需要尝试这个。