Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

json.decoder.JSONDecodeError #37

Description

@rohitjangid96
from servicenow import ServiceNow
from servicenow import Connection

# Connect using default api method (JSON)
conn = Connection.Auth(username='*****', password='*****', instance='cablevision')
inc = ServiceNow.Incident(conn)


inc = inc.fetch_one({'number': 'INC0665393'})

Traceback (most recent call last):
File "C:/Users/rohitjan/PycharmProjects/AutomationScripts/sernow.py", line 10, in
inc = inc.fetch_one({'number': 'INC0665393'})
File "C:\Users\rohitjan\PycharmProjects\AutomationScripts\venv\lib\site-packages\servicenow\Utils.py", line 13, in caching
return f(*args, **kwargs)
File "C:\Users\rohitjan\PycharmProjects\AutomationScripts\venv\lib\site-packages\servicenow\ServiceNow.py", line 29, in fetch_one
response = self.fetch_all(meta, **kwargs)
File "C:\Users\rohitjan\PycharmProjects\AutomationScripts\venv\lib\site-packages\servicenow\Utils.py", line 13, in caching
return f(*args, **kwargs)
File "C:\Users\rohitjan\PycharmProjects\AutomationScripts\venv\lib\site-packages\servicenow\ServiceNow.py", line 21, in fetch_all
return self.format(self.Connection._get(self.table, meta, **kwargs))
File "C:\Users\rohitjan\PycharmProjects\AutomationScripts\venv\lib\site-packages\servicenow\ServiceNow.py", line 54, in format
return self.Connection._format(response)
File "C:\Users\rohitjan\PycharmProjects\AutomationScripts\venv\lib\site-packages\servicenow\Connection.py", line 116, in format
return json.loads(response.text)
File "C:\Users\rohitjan\AppData\Local\Programs\Python\Python37-32\lib\json_init
.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\Users\rohitjan\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\rohitjan\AppData\Local\Programs\Python\Python37-32\lib\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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions