I am writing an external python script using the frappeclient, trying to implement multithreading for my custom docs, for sending e-mail.
I am using this api as:
frappeOb.post_api('frappe.core.doctype.communication.email.make',args)
where args contains the parameters like doctype,name,content,subject,recipient,communication_type,sent_or_received,etc and FrappeOb is the variable where I passed credientials as
FrappeOb = FrappeClient('http://myurl','administrator','erpnext')
but it is giving me error. The complete tracebacks are below:
Unhandled exception in thread started by <function process_techniq at 0x03336770>
Traceback (most recent call last):
File "C:/Users/System/Desktop/Schede/test.py", line 34, in process_techniq
response =frappeOb.post_api('frappe.core.doctype.communication.email.make',args);
File "C:/Users/System/Desktop/Schede\frappeclient.py", line 227, in post_api
return self.post_process(res)
File "C:/Users/System/Desktop/Schede\frappeclient.py", line 251, in post_process
rjson = response.json()
File "C:\Python27\lib\site-packages\requests\models.py", line 896, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Python27\lib\site-packages\simplejson\__init__.py", line 518, in loads
return _default_decoder.decode(s)
File "C:\Python27\lib\site-packages\simplejson\decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "C:\Python27\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Any help will be appreciated.
Thank You