Greetings, Actually any advice on how to test or diagnose my mod_python code would be appreciated. For the most part I've been trying to keep as much of my code as possible separated from the actual interaction with freeswitch so that it's separately testable. But I will occasionally run into: [ERR] mod_python.c:121 eval_some_python() Error importing module This latest is, I think some missing modules in site_packages, but it'd be nice to get some output hinting at that. So nice would be able to have a mocked out _freeswitch so the rest of my unit test stuff could run. Or failing that, is there a switch I can flip to get some of the python errors output to the log? TIA, Brian
Have you see this http://fisheye.freeswitch.org/browse/FreeSWITCH/src/mod/languages/mod_python... /b On Jan 28, 2009, at 4:31 PM, Brian Deacon wrote:
Greetings,
Actually any advice on how to test or diagnose my mod_python code would be appreciated. For the most part I've been trying to keep as much of my code as possible separated from the actual interaction with freeswitch so that it's separately testable. But I will occasionally run into: [ERR] mod_python.c:121 eval_some_python() Error importing module
This latest is, I think some missing modules in site_packages, but it'd be nice to get some output hinting at that. So nice would be able to have a mocked out _freeswitch so the rest of my unit test stuff could run. Or failing that, is there a switch I can flip to get some of the python errors output to the log?
TIA, 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 have. But 'says here: http://wiki.freeswitch.org/wiki/Mod_python#Can_I_test_scripts_using_python_s... That the "import _freeswitch" in freeswitch.py breaks except when the script is run by mod_python. (At which point there is some python voodoo going on here that is beyond me. Is _freeswitch a runtime-generated SWIGism?) So I was thinking I could dump a _freeswitch.py onto the PYTHONPATH when trying to debug code outside of mod_python. But probably easier for trivial things would be to just get the python error output to spit to the log, but it seems to be getting swallowed. Or was there something else in python_example.py that I've been too dense to notice? Brian On Wed, 2009-01-28 at 16:39 -0600, Brian West wrote:
Have you see this
http://fisheye.freeswitch.org/browse/FreeSWITCH/src/mod/languages/mod_python...
/b
On Jan 28, 2009, at 4:31 PM, Brian Deacon wrote:
Greetings,
Actually any advice on how to test or diagnose my mod_python code would be appreciated. For the most part I've been trying to keep as much of my code as possible separated from the actual interaction with freeswitch so that it's separately testable. But I will occasionally run into: [ERR] mod_python.c:121 eval_some_python() Error importing module
This latest is, I think some missing modules in site_packages, but it'd be nice to get some output hinting at that. So nice would be able to have a mocked out _freeswitch so the rest of my unit test stuff could run. Or failing that, is there a switch I can flip to get some of the python errors output to the log?
TIA, 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
_______________________________________________ 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
On Jan 28, 2009, at 6:07 PM, Brian Deacon wrote:
I have. But 'says here: http://wiki.freeswitch.org/wiki/Mod_python#Can_I_test_scripts_using_python_s...
That the "import _freeswitch" in freeswitch.py breaks except when the script is run by mod_python. (At which point there is some python voodoo going on here that is beyond me. Is _freeswitch a runtime-generated SWIGism?)
Correct you can't do that unless its running in mod_python inside FreeSWITCH.
So I was thinking I could dump a _freeswitch.py onto the PYTHONPATH when trying to debug code outside of mod_python. But probably easier for trivial things would be to just get the python error output to spit to the log, but it seems to be getting swallowed.
Or was there something else in python_example.py that I've been too dense to notice?
I think the key is to know you can only run it inside FreeSWITCH.
Brian
very much voodoo going on. The freeswitch.py is generated by swig to link the FS api into FS itself so when the python script runs it uses the glue to get to the .so who in turn references symbols back into FS itself. So it can't run outside of FS because it depends on symbols from the core. On Wed, Jan 28, 2009 at 6:07 PM, Brian Deacon <bdeacon@highergear.com>wrote:
I have. But 'says here:
http://wiki.freeswitch.org/wiki/Mod_python#Can_I_test_scripts_using_python_s...
That the "import _freeswitch" in freeswitch.py breaks except when the script is run by mod_python. (At which point there is some python voodoo going on here that is beyond me. Is _freeswitch a runtime-generated SWIGism?)
So I was thinking I could dump a _freeswitch.py onto the PYTHONPATH when trying to debug code outside of mod_python. But probably easier for trivial things would be to just get the python error output to spit to the log, but it seems to be getting swallowed.
Or was there something else in python_example.py that I've been too dense to notice?
Brian
On Wed, 2009-01-28 at 16:39 -0600, Brian West wrote:
Have you see this
http://fisheye.freeswitch.org/browse/FreeSWITCH/src/mod/languages/mod_python...
/b
On Jan 28, 2009, at 4:31 PM, Brian Deacon wrote:
Greetings,
Actually any advice on how to test or diagnose my mod_python code would be appreciated. For the most part I've been trying to keep as much of my code as possible separated from the actual interaction with freeswitch so that it's separately testable. But I will occasionally run into: [ERR] mod_python.c:121 eval_some_python() Error importing module
This latest is, I think some missing modules in site_packages, but it'd be nice to get some output hinting at that. So nice would be able to have a mocked out _freeswitch so the rest of my unit test stuff could run. Or failing that, is there a switch I can flip to get some of the python errors output to the log?
TIA, 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
_______________________________________________ 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
_______________________________________________ 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
participants (3)
-
Anthony Minessale
-
Brian Deacon
-
Brian West