VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
tleyden at branchcut.com Guest
|
Posted: Mon Dec 01, 2008 3:34 am Post subject: [Freeswitch-users] Freeswitch-users Digest, Vol 29, Issue 18 |
|
|
Quote: |
Message: 9
Date: Sun, 30 Nov 2008 18:42:30 -0800 (PST)
From: Marc Orenberg <marc@kasteris.com (marc@kasteris.com)>
Subject: [Freeswitch-users] Problem importing modules in mod_python
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Message-ID: <195670.44941.qm@web50805.mail.re2.yahoo.com (195670.44941.qm@web50805.mail.re2.yahoo.com)>
Content-Type: text/plain; charset="iso-8859-1"
In the latter versions of mod_python, I'm unable to import standard python modules such as time and MySQLdb.?
For example, the following script works fine in version 1.0.1:
??? ??? import time
??? ??? import os
??? ??? from freeswitch import *
??? ??? def handler(session, args):
??? ??? ??? session.answer()
??? ??? ??? session.execute("sleep", "2000")
??? ??? ??? session.streamFile("/usr/local/freeswitch/prompts/01Welcome.wav")
??? ??? ??? return(session)
But in freeswitch-1.0.latest.tar.gz, and svn versions 10556-10558, I get the following error:
??? ??? 2008-11-30 21:13:09 [ERR] mod_python.c:129 eval_some_python() Error reloading module
??? ??? Traceback (most recent call last):
??????? File "/usr/lib/python2.4/site-packages/scripts/test.py", line 1, in ?
??? ??? import time
??? ??? ImportError: /usr/lib/python2.4/lib-dynload/timemodule.so: undefined symbol: PyExc_ValueError
Thanks for your help!
|
I have run into the same problem and put some documentation on the wiki:
http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2F...2Fdatetime.so:_undefined_symbol:_PyExc_IOError
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.
HTH |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Mon Dec 01, 2008 12:08 pm Post subject: [Freeswitch-users] Freeswitch-users Digest, Vol 29, Issue 18 |
|
|
we no longer use global name space in our shared objects which seems to have a side effect on modules who in turn try to load it's own shared objects because they too inherit the non-global namespace param.
you can either add an attribute to the modues.conf to ask it to load with global name space
<load module="mod_foo" global="true"/>
or you can edit the code to request global loading every time.
by adding the param SMODF_GLOBAL_SYMBOLS to the SWITCH_MODULE_DEFINITION macro
(See mod_cepstral at the top)
On Mon, Dec 1, 2008 at 2:31 AM, Traun Leyden <tleyden@branchcut.com (tleyden@branchcut.com)> wrote:
Quote: |
Quote: |
Message: 9
Date: Sun, 30 Nov 2008 18:42:30 -0800 (PST)
From: Marc Orenberg <marc@kasteris.com (marc@kasteris.com)>
Subject: [Freeswitch-users] Problem importing modules in mod_python
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Message-ID: <195670.44941.qm@web50805.mail.re2.yahoo.com (195670.44941.qm@web50805.mail.re2.yahoo.com)>
Content-Type: text/plain; charset="iso-8859-1"
In the latter versions of mod_python, I'm unable to import standard python modules such as time and MySQLdb.?
For example, the following script works fine in version 1.0.1:
??? ??? import time
??? ??? import os
??? ??? from freeswitch import *
??? ??? def handler(session, args):
??? ??? ??? session.answer()
??? ??? ??? session.execute("sleep", "2000")
??? ??? ??? session.streamFile("/usr/local/freeswitch/prompts/01Welcome.wav")
??? ??? ??? return(session)
But in freeswitch-1.0.latest.tar.gz, and svn versions 10556-10558, I get the following error:
??? ??? 2008-11-30 21:13:09 [ERR] mod_python.c:129 eval_some_python() Error reloading module
??? ??? Traceback (most recent call last):
??????? File "/usr/lib/python2.4/site-packages/scripts/test.py", line 1, in ?
??? ??? import time
??? ??? ImportError: /usr/lib/python2.4/lib-dynload/timemodule.so: undefined symbol: PyExc_ValueError
Thanks for your help!
|
I have run into the same problem and put some documentation on the wiki:
http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2F...2Fdatetime.so:_undefined_symbol:_PyExc_IOError
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.
HTH
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Mon Dec 01, 2008 12:29 pm Post subject: [Freeswitch-users] Freeswitch-users Digest, Vol 29, Issue 18 |
|
|
Try changing the module definition to use global symbols the same way we did in mod_lua, see if that resolves the issue.
Mike
On Dec 1, 2008, at 3:31 AM, Traun Leyden wrote:
Quote: |
Quote: |
Message: 9
Date: Sun, 30 Nov 2008 18:42:30 -0800 (PST)
From: Marc Orenberg <marc@kasteris.com (marc@kasteris.com)>
Subject: [Freeswitch-users] Problem importing modules in mod_python
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Message-ID: <195670.44941.qm@web50805.mail.re2.yahoo.com (195670.44941.qm@web50805.mail.re2.yahoo.com)>
Content-Type: text/plain; charset="iso-8859-1"
In the latter versions of mod_python, I'm unable to import standard python modules such as time and MySQLdb.?
For example, the following script works fine in version 1.0.1:
??? ??? import time
??? ??? import os
??? ??? from freeswitch import *
??? ??? def handler(session, args):
??? ??? ??? session.answer()
??? ??? ??? session.execute("sleep", "2000")
??? ??? ??? session.streamFile("/usr/local/freeswitch/prompts/01Welcome.wav")
??? ??? ??? return(session)
But in freeswitch-1.0.latest.tar.gz, and svn versions 10556-10558, I get the following error:
??? ??? 2008-11-30 21:13:09 [ERR] mod_python.c:129 eval_some_python() Error reloading module
??? ??? Traceback (most recent call last):
??????? File "/usr/lib/python2.4/site-packages/scripts/test.py", line 1, in ?
??? ??? import time
??? ??? ImportError: /usr/lib/python2.4/lib-dynload/timemodule.so: undefined symbol: PyExc_ValueError
Thanks for your help!
|
I have run into the same problem and put some documentation on the wiki:
http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2F...2Fdatetime.so:_undefined_symbol:_PyExc_IOError
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.
HTH
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|