Hello Guys,I'm writing a script in python which when run via cli works properly. I get some dta via http (urllib3) and parse it like:r = http.request('GET', 'https://www.massphoning.net/customer/inMassphoning/ ' + caller)getInCampaignInfo?phone= if r.status == 200:httpResult = json.loads(r.data.decode('utf-8' ))Then print it like:print('Response Parsed: %s\n' % CampaignData)print('CamapignType: %s\n' % CampaignData['campaing_type'])and via the CLI works nicely.But when run on freeswitch dialplanprint('Response Parsed: %s\n' % CampaignData)runs properly and prints on the log the data, but it fails on:print('CamapignType: %s\n' % CampaignData['campaing_type'])with:2018-06-14 03:33:28.971179 [ERR] mod_python.c:164 Python Error by calling script "foo": <type 'exceptions.TypeError'>Message: in method 'consoleLog', argument 2 of type 'char *'Exception: NoneTraceback (most recent call last)File: "/opt/freeswitch/share/freeswitch/scripts/foo.py", line 16, in handler File: "/opt/freeswitch/share/freeswitch/scripts/foo.py", line 69, in getCampaignInfo Any ideas??Thanks!ᐧ
____________________________________________________________ _____________
Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com
Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch- users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/ options/freeswitch-users
https://freeswitch.com