Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot connect to Jira using JIRA API rest calls

Charles Bovalis March 22, 2019

Consider the following segment: 

from jira import JIRA

j_options = {
   'server': 'https://jira.company-name.com',
   'verify': False
}

j = JIRA(options=j_options, basic_auth=('my-user-name', 'my-passwd')) 

 

I am getting the following error: 

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/Users/cbovalis/.local/share/virtualenvs/JIRA-PYTHON-C6Am-hkI/lib/python3.7/site-packages/jira/client.py", line 472, in __init__

    si = self.server_info()

  File "/Users/cbovalis/.local/share/virtualenvs/JIRA-PYTHON-C6Am-hkI/lib/python3.7/site-packages/jira/client.py", line 2133, in server_info

    j = self._get_json('serverInfo')

  File "/Users/cbovalis/.local/share/virtualenvs/JIRA-PYTHON-C6Am-hkI/lib/python3.7/site-packages/jira/client.py", line 2554, in _get_json

    raise e

  File "/Users/cbovalis/.local/share/virtualenvs/JIRA-PYTHON-C6Am-hkI/lib/python3.7/site-packages/jira/client.py", line 2551, in _get_json

    r_json = json_loads(r)

  File "/Users/cbovalis/.local/share/virtualenvs/JIRA-PYTHON-C6Am-hkI/lib/python3.7/site-packages/jira/utils/__init__.py", line 80, in json_loads

    return r.json()

  File "/Users/cbovalis/.local/share/virtualenvs/JIRA-PYTHON-C6Am-hkI/lib/python3.7/site-packages/requests/models.py", line 897, in json

    return complexjson.loads(self.text, **kwargs)

  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads

    return _default_decoder.decode(s)

  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode

    obj, end = self.raw_decode(s, idx=_w(s, 0).end())

  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode

    raise JSONDecodeError("Expecting value", s, err.value) from None

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

>>>

 

Maybe I need to specify header specific content tags ? 

Can you please help ????   I would very much appreciate any feedback  

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events