Re: [Freeswitch-users] More troubles with SQLAlchemy and mod_python
2009-01-29 15:57:12 [NOTICE] mod_python.c:107 eval_some_python() Invoking py module: callcontrol.routing.DummyRouteHandler 2009-01-29 15:57:12 [ERR] mod_python.c:121 eval_some_python() Error importing module Traceback (most recent call last): File "/usr/local/freeswitch/python/callcontrol/routing/DummyRouteHandler.py", line 19, in ? import sqlalchemy File "/usr/lib/python2.4/site-packages/sqlalchemy/__init__.py", line 8, in ? from sqlalchemy.types import \ File "/usr/lib/python2.4/site-packages/sqlalchemy/types.py", line 25, in ? import datetime as dt ImportError: /usr/lib/python2.4/lib-dynload/datetime.so: undefined symbol: _Py_ZeroStruct
Ahh, that looks like the "global symbol import" error. http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2Fusr.2Flib.2F...2F... Should be very easy to fix.. see the wiki page.
Traun, If you knew that, why didn't you commit it to trunk? I added it to r11560 Brian, Can you try freeswitch latest trunk? On Thu, Jan 29, 2009 at 7:05 PM, Traun Leyden <tleyden@branchcut.com> wrote:
2009-01-29 15:57:12 [NOTICE] mod_python.c:107 eval_some_python() Invoking py module: callcontrol.routing.DummyRouteHandler 2009-01-29 15:57:12 [ERR] mod_python.c:121 eval_some_python() Error importing module Traceback (most recent call last): File "/usr/local/freeswitch/python/callcontrol/routing/DummyRouteHandler.py", line 19, in ? import sqlalchemy File "/usr/lib/python2.4/site-packages/sqlalchemy/__init__.py", line 8, in ? from sqlalchemy.types import \ File "/usr/lib/python2.4/site-packages/sqlalchemy/types.py", line 25, in ? import datetime as dt ImportError: /usr/lib/python2.4/lib-dynload/datetime.so: undefined symbol: _Py_ZeroStruct
Ahh, that looks like the "global symbol import" error.
http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2Fusr.2Flib.2F...2F...
Should be very easy to fix.. see the wiki page.
_______________________________________________ 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 http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Building now, Dunno if this is a dork-up on my part or a problem with the svn version versus the tarball version, but after a bootstrap.sh, configure, make megaclean and make installall, it complained about the lack of a quiet_libtool in the root of the source directory. I just copied in the one I had from my tarball version and the build is chewing on it. I'll let you know if this does the trick. Brian On Thu, 2009-01-29 at 19:22 -0600, Anthony Minessale wrote:
Traun,
If you knew that, why didn't you commit it to trunk?
I added it to r11560
Brian,
Can you try freeswitch latest trunk?
On Thu, Jan 29, 2009 at 7:05 PM, Traun Leyden <tleyden@branchcut.com> wrote:
2009-01-29 15:57:12 [NOTICE] mod_python.c:107 eval_some_python() Invoking py module: callcontrol.routing.DummyRouteHandler 2009-01-29 15:57:12 [ERR] mod_python.c:121 eval_some_python() Error importing module Traceback (most recent call last): File "/usr/local/freeswitch/python/callcontrol/routing/DummyRouteHandler.py", line 19, in ? import sqlalchemy File "/usr/lib/python2.4/site-packages/sqlalchemy/__init__.py", line 8, in ? from sqlalchemy.types import \ File "/usr/lib/python2.4/site-packages/sqlalchemy/types.py", line 25, in ? import datetime as dt ImportError: /usr/lib/python2.4/lib-dynload/datetime.so: undefined symbol: _Py_ZeroStruct
Ahh, that looks like the "global symbol import" error.
http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2Fusr.2Flib.2F...2F...
Should be very easy to fix.. see the wiki page.
_______________________________________________ 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 http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400 _______________________________________________ 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 http://www.freeswitch.org
You don't use make installall anymore. Just use "make current" to bring it up to trunk. /b On Jan 29, 2009, at 8:06 PM, Brian Deacon wrote:
Building now, Dunno if this is a dork-up on my part or a problem with the svn version versus the tarball version, but after a bootstrap.sh, configure, make megaclean and make installall, it complained about the lack of a quiet_libtool in the root of the source directory. I just copied in the one I had from my tarball version and the build is chewing on it.
I'll let you know if this does the trick.
Brian
TA-DA! My python can now not only import the sqlalchemy module, but the code I had before that was actually doing some database interaction is working now. Thank you very much for all the help. It is much appreciated. It sounds like the contents on the wiki with the modules.conf.xml or the LD workarounds are superceded now. Should I change the comments on there to reflect that it should now be fixed? Brian On Thu, 2009-01-29 at 19:22 -0600, Anthony Minessale wrote:
Traun,
If you knew that, why didn't you commit it to trunk?
I added it to r11560
Brian,
Can you try freeswitch latest trunk?
On Thu, Jan 29, 2009 at 7:05 PM, Traun Leyden <tleyden@branchcut.com> wrote:
2009-01-29 15:57:12 [NOTICE] mod_python.c:107 eval_some_python() Invoking py module: callcontrol.routing.DummyRouteHandler 2009-01-29 15:57:12 [ERR] mod_python.c:121 eval_some_python() Error importing module Traceback (most recent call last): File "/usr/local/freeswitch/python/callcontrol/routing/DummyRouteHandler.py", line 19, in ? import sqlalchemy File "/usr/lib/python2.4/site-packages/sqlalchemy/__init__.py", line 8, in ? from sqlalchemy.types import \ File "/usr/lib/python2.4/site-packages/sqlalchemy/types.py", line 25, in ? import datetime as dt ImportError: /usr/lib/python2.4/lib-dynload/datetime.so: undefined symbol: _Py_ZeroStruct
Ahh, that looks like the "global symbol import" error.
http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2Fusr.2Flib.2F...2F...
Should be very easy to fix.. see the wiki page.
_______________________________________________ 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 http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400 _______________________________________________ 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 http://www.freeswitch.org
Can you do some examples and documentation on the wiki about what you're doing to maybe help others? /b On Jan 29, 2009, at 8:27 PM, Brian Deacon wrote:
TA-DA!
My python can now not only import the sqlalchemy module, but the code I had before that was actually doing some database interaction is working now.
Thank you very much for all the help. It is much appreciated.
It sounds like the contents on the wiki with the modules.conf.xml or the LD workarounds are superceded now. Should I change the comments on there to reflect that it should now be fixed?
Brian
I have to ask to _please_ do add more info on the wiki about that cos python is a language that has been growing a lot on commercial and open source worlds. I have a personal interest on that as well since I intend to do some things with the mod_python module as well. Thanks, Mesquita On Jan 30, 2009, at 12:34 AM, Brian West wrote:
Can you do some examples and documentation on the wiki about what you're doing to maybe help others?
/b
On Jan 29, 2009, at 8:27 PM, Brian Deacon wrote:
TA-DA!
My python can now not only import the sqlalchemy module, but the code I had before that was actually doing some database interaction is working now.
Thank you very much for all the help. It is much appreciated.
It sounds like the contents on the wiki with the modules.conf.xml or the LD workarounds are superceded now. Should I change the comments on there to reflect that it should now be fixed?
Brian
_______________________________________________ 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 http://www.freeswitch.org
I would love to give back in return for the help you guys have given me, but I'm not sure what would be valuable. In terms of what it took to get my stuff to work correctly, it just came down to Anthony checking in the code fix. My other (failed) attempts to work against a differently compiled Python weren't necessary. Moreover, it now works with the python 2.4 I have on that machine as opposed to an "official" 2.5 python package I was going to replace it with. So I've updated the part in the wiki about this bug to basically just say "Fixed in the code now": http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2F...2Fdatetime.so:... and http://wiki.freeswitch.org/wiki/Mod_python#ImportError:_.2Fusr.2Flib.2F...2F... What maybe isn't on the wiki (or at least I didn't see it) is that the only way I was able to see the error output was to run freeswitch from gdb. Would I have seen that log output by bumping up the loglevel from fs_cli? But otherwise what I'm doing so far is pretty generic to the other examples: <action application="set" data="myvar=python(mypackage.mymodule)" /> And mymodule is just a standard fsapi(session, stream, env, args) The only "tricky" thing was that the code called from fsapi was calling out to a postgresql database via sqlalchemy. But from python's point of view, there's nothing clever about talking to databases, and from freeswitch's point of view there's nothing clever about calling a python module's fsapi function. I'll poke around and see if there's anything in the mod_python area that I could improve on, but if you could point out anything worthwhile that I just accomplished (or rather, that y'all accomplished for me) I'd be more than happy to document it. But near as I can tell, all I've really done is help you guys fix the bug for which I was the loudest complainer. :) Brian On Thu, 2009-01-29 at 20:34 -0600, Brian West wrote:
Can you do some examples and documentation on the wiki about what you're doing to maybe help others?
/b
On Jan 29, 2009, at 8:27 PM, Brian Deacon wrote:
TA-DA!
My python can now not only import the sqlalchemy module, but the code I had before that was actually doing some database interaction is working now.
Thank you very much for all the help. It is much appreciated.
It sounds like the contents on the wiki with the modules.conf.xml or the LD workarounds are superceded now. Should I change the comments on there to reflect that it should now be fixed?
Brian
_______________________________________________ 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 http://www.freeswitch.org
participants (5)
-
Anthony Minessale
-
Brian Deacon
-
Brian West
-
João Mesquita
-
Traun Leyden