Can't connect to JIRA-api via python-jira lib -


i can't authenticate python-jira try use https://pypi.python.org/pypi/jira/ according documentation use

from jira import jira  jira = jira('https://pm.maddevs.co/') # not sure if correct use our site server or jiras  username = 'my_user_name' password = 'my_pass' authed_jira = jira(basic_auth=(username, password)) 

i have mistake like

warning:root:httpconnectionpool(host='localhost', port=2990): max retries exceeded url: /jira/rest/api/2/serverinfo (caused newconnectionerror('<urllib3.connection.httpconnection object @ 0x7f8a7e228198>: failed establish new connection: [errno 111] connection refused',)) while doing http://localhost:2990/jira/rest/api/2/serverinfo [{'headers': {'x-atlassian-token': 'no-check', 'content-type': 'application/json', 'accept-encoding': 'gzip, deflate', 'cache-control': 'no-cache', 'connection': 'keep-alive', 'accept': 'application/json,*.*;q=0.9', 'user-agent': 'python-requests/2.18.4'}, 'params': none}] warning:root:got connectionerror [httpconnectionpool(host='localhost', port=2990): max retries exceeded url: /jira/rest/api/2/serverinfo (caused newconnectionerror('<urllib3.connection.httpconnection object @ 0x7f8a7e228198>: failed establish new connection: [errno 111] connection refused',))] errno:none on http://localhost:2990/jira/rest/api/2/serverinfo {'response': none, 'request': <preparedrequest [get]>}\{'response': none, 'request': <preparedrequest [get]>} warning:root:got recoverable error http://localhost:2990/jira/rest/api/2/serverinfo, retry [1/3] in 17.18299613314676s. err: httpconnectionpool(host='localhost', port=2990): max retries exceeded url: /jira/rest/api/2/serverinfo (caused newconnectionerror('<urllib3.connection.httpconnection object @ 0x7f8a7e228198>: failed establish new connection: [errno 111] connection refused',)) 

you should use following format connect server:

jira = jira(basic_auth=(un, pwd), options={'server': server}) 

so code this:

from jira import jira  username = 'my_user_name' password = 'my_pass' jira = jira(basic_auth=(username, password), options = {'server': 'https://pm.maddevs.co/'}) 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -