<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">attached is from 23-31. &nbsp;All the python script does is connects to the mysql db and returns a string back. &nbsp;I had to do it this way because the luasql was having the same issue. &nbsp;Script works when called via commandline, but when called in FS it fails.<div><br><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);">pythonResult = <span style="color: #25b2bf">assert</span> (<span style="color: #25b2bf">io.popen</span> (<span style="color: #bc321c">'/usr/bin/python python2lua.py '</span> ..callerID))</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(188, 50, 28); background-color: rgb(254, 244, 156);"><span style="color: #000000">freeswitch.consoleLog(</span>"INFO"<span style="color: #000000">,</span>"--------------------------------------------------<span style="color: #ce33cc">\n</span>"<span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);">&nbsp; &nbsp; &nbsp; &nbsp; freeswitch.consoleLog(<span style="color: #bc321c">"INFO"</span>, <span style="color: #bc321c">"got here OK </span><span style="color: #ce33cc">\n</span><span style="color: #bc321c">"</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(188, 50, 28); background-color: rgb(254, 244, 156);"><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; freeswitch.consoleLog(</span>"INFO"<span style="color: #000000">,</span>"---------------------------------------------------<span style="color: #ce33cc">\n</span>"<span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156); min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; background-color: rgb(254, 244, 156);">freeswitch.consoleLog(<span style="color: #bc321c">"INFO"</span>, <span style="color: #bc321c">'|'</span>..pythonResult.. <span style="color: #bc321c">"-----</span><span style="color: #ce33cc">\n</span><span style="color: #bc321c">"</span>);</div><div><div>On Jan 3, 2014, at 10:07 PM, Erik M. Devane - Comms Guy &lt;<a href="mailto:emdevane@gmail.com">emdevane@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Are you using .. in your script somewhere?<div><br></div><div>There may be some work (like converting to string) that happens on the command line, but won't in dialplan<span></span>&nbsp;use.</div><div><br></div><div>Can we see line 31 of your script?<br>
<br>On Friday, January 3, 2014, Joli Martinez  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hello,<div><br></div><div>I have a script that connects to a mysql db. &nbsp;The script works perfect when I type "lua &nbsp;&lt;scriptname&gt;", but when I have Freeswitch all the script I get the following error message. &nbsp;I have changed my script to now call a python script to read the database and I am experiencing the same result. &nbsp;If I call the script from the command line it works but Freeswitch throws this error.</div>
<div><br></div><div>Please help,</div><div><br></div><div>Thanks,</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(188,50,28);background-color:rgb(254,244,156)">2014-01-03 18:52:28.381720 [ERR] mod_lua.cpp:199 /usr/local/freeswitch/scripts/testCallerID.lua:31: attempt to concatenate global 'pythonResult' (a userdata value)</div>
<div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(188,50,28);background-color:rgb(254,244,156)">stack traceback:</div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(188,50,28);background-color:rgb(254,244,156)">
<span style="white-space:pre-wrap">        </span>/usr/local/freeswitch/scripts/testCallerID.lua:31: in main chunk</div></div><div><br></div></div></blockquote></div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></div></body></html>