Im trying to create an incident to the server which is hosted on another ubuntu machine. I saved the below code as test.py file and when i execute this from a local ubuntu machine it works fine, But when i execute this from a remote aws ec2 machine, it throws error. Kindly help
from irisclient import Irisclient
client = IrisClient(
app='oncall',
key='magic',
api_host='http://192.168.54.101:16649'
)
client.incident(plan='Oncall test', context=
{
"description": "hello",
"requester": "joe"
}
)
error logs
File "/usr/lib/python2.7/dist-packages/irisclient/__init__.py", line 52, in incident
r = self.post(self.url + 'incidents', json=incident_json)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 377, in post
return self.request('POST', url, data=data, **kwargs)
TypeError: request() got an unexpected keyword argument 'json'