<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Try changing the module definition to use global symbols the same way we did in mod_lua, see if that resolves the issue.<div><br></div><div>Mike</div><div><br><div><div>On Dec 1, 2008, at 3:31 AM, Traun Leyden wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> Message: 9<br> Date: Sun, 30 Nov 2008 18:42:30 -0800 (PST)<br> From: Marc Orenberg <<a href="mailto:marc@kasteris.com">marc@kasteris.com</a>><br> Subject: [Freeswitch-users] Problem importing modules in mod_python<br> To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br> Message-ID: <<a href="mailto:195670.44941.qm@web50805.mail.re2.yahoo.com">195670.44941.qm@web50805.mail.re2.yahoo.com</a>><br> Content-Type: text/plain; charset="iso-8859-1"<br> <br> In the latter versions of mod_python, I'm unable to import standard python modules such as time and MySQLdb.?<br> For example, the following script works fine in version 1.0.1:<br> <br> ??? ??? import time<br> ??? ??? import os<br> ??? ??? from freeswitch import *<br> ??? ??? def handler(session, args):<br> ??? ??? ??? session.answer()<br> ??? ??? ??? session.execute("sleep", "2000")<br> ??? ??? ??? session.streamFile("/usr/local/freeswitch/prompts/01Welcome.wav")<br> ??? ??? ??? return(session)<br> <br> But in freeswitch-1.0.latest.tar.gz, and svn versions 10556-10558, I get the following error:<br> <br> ??? ??? 2008-11-30 21:13:09 [ERR] mod_python.c:129 eval_some_python() Error reloading module<br> ??? ??? Traceback (most recent call last):<br> ??????? File "/usr/lib/python2.4/site-packages/scripts/test.py", line 1, in ?<br> ??? ??? import time<br> ??? ??? ImportError: /usr/lib/python2.4/lib-dynload/timemodule.so: undefined symbol: PyExc_ValueError<br> <br> Thanks for your help!<br> </blockquote><div><br>I have run into the same problem and put some documentation on the wiki:<br><br><a href="http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2F...2Fdatetime.so:_undefined_symbol:_PyExc_IOError">http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2F...2Fdatetime.so:_undefined_symbol:_PyExc_IOError</a><br> <br>I think something changed in freeswitch in the way it is loading modules, or at least the way it is loading mod_python. This behavior appeared all of the sudden in recent freeswitch versions.<br><br>HTH <br></div></div> <br> _______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><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></body></html>