我想使用 python 在 JIRA 上创建问题,所以我正在学习Welcome to jira-python's documentation的方式。
但是第一个问题让我很困惑。如果我们使用自己的 JIRA,服务器是什么?在本文档中,它使用https://jira.atlassian.com。如果我使用 JIRA,其 url 类似于:https://bugs.company.com/secure/Dashboard.jspa。我的服务器是什么?
现在,我正在使用
jira = JIRA(options={'server': 'https://bugs.company.com'})
projects = jira.projects()
keys = [project.key for project in projects]
我会得到错误:
Traceback (most recent call last):
File "MethodTest.py", line 9, in <module>
projects = jira.projects()
File "/Library/Python/2.7/site-packages/jira/client.py", line 838, in projects
r_json = self._get_json('project')
File "/Library/Python/2.7/site-packages/jira/client.py", line 1423, in _get_json
r_json = json.loads(r.text)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 326, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded