Fwd: mod_python always gives an error at first dialplan call
Hi guys. I know I've already asked this on the freeswitch-dev mailing list but since i still didn't get an answer, i'm sending it again, this time to the freeswitch-users ML too. I'm experiencing a weird behavior with the new FS 1.4. Everytime i call a python script in the dialplan after a reboot i always got an error similar to this: 2014-08-18 07:03:26.341145 [ERR] mod_python.c:293 Error calling python script 2014-08-18 07:03:26.341145 [ERR] mod_python.c:164 Python Error by calling script "stable.disa": <type 'exceptions.AttributeError'> Message: 'PySwigObject' object has no attribute 'sleep' This only happens with the first call after a restart. After that everything works fine. I never saw this in FS 1.2 This seem to happen only the first time mod_python is invoked and *session* object is used, no mater the script.The other python scripts will work after one (anyone) is used. As said before, after *session* object is accessed once, after a restart (giving back the error), everything starts working again. Any ideas on why? Thanks. *Note:* I'm using FS Version 1.4.8 64bit -- *Nuno Miguel Reis* | *Unified Communication** Systems* M. +351 913907481 | nreis@wavecom.pt WAVECOM-Soluções Rádio, S.A. Cacia Park | Rua do Progresso, Lote 15 3800-639 AVEIRO | Portugal T. +351 309 700 225 | F. +351 234 919 191 *GPS <http://maps.google.com/maps/ms?msa=0&msid=202333747613191340808.0004b4b227a6144f0df88> | www.wavecom.pt <http://www.wavecom.pt/>** <http://www.wavecom.pt/>* [image: Description: Description: WavecomSignature] <http://www.wavecom.pt/pt/wavecom/premios.php> [image: Publicity] <http://www.wavecom.pt/pt/mail_eventos.php> ---------- Forwarded message ---------- From: Nuno Reis <nreis@wavecom.pt> Date: Mon, Aug 18, 2014 at 7:12 AM Subject: mod_python always gives an error at first dialplan call To: freeswitch-dev@lists.freeswitch.org Hi guys. -- *Nuno Miguel Reis* | *Unified Communication** Systems* M. +351 913907481 | nreis@wavecom.pt WAVECOM-Soluções Rádio, S.A. Cacia Park | Rua do Progresso, Lote 15 3800-639 AVEIRO | Portugal T. +351 309 700 225 | F. +351 234 919 191 *GPS <http://maps.google.com/maps/ms?msa=0&msid=202333747613191340808.0004b4b227a6144f0df88> | www.wavecom.pt <http://www.wavecom.pt/>** <http://www.wavecom.pt/>* [image: Description: Description: WavecomSignature] <http://www.wavecom.pt/pt/wavecom/premios.php> [image: Publicity] <http://www.wavecom.pt/pt/mail_eventos.php>
2014-08-18 07:03:26.341145 [ERR] mod_python.c:293 Error calling python script 2014-08-18 07:03:26.341145 [ERR] mod_python.c:164 Python Error by calling script "stable.disa": <type 'exceptions.AttributeError'> Message: 'PySwigObject' object has no attribute 'sleep'
This only happens with the first call after a restart. After that everything works fine. I never saw this in FS 1.2
Can you post come code? I am guessing you can probably add in some retry logic for whatever situation causes the object to not have the expected attribute...
Hi Joseph. Nop. Retry logic isn't the solution here. That's sweeping dirt under the rug kind of solution. This happens with an all bunch of scripts that i was using flawlessly in FS 1.2 Maybe it is time to open a jira for this. Thanks anyway. BR, -- *Nuno Miguel Reis* | *Unified Communication** Systems* M. +351 913907481 | nreis@wavecom.pt WAVECOM-Soluções Rádio, S.A. Cacia Park | Rua do Progresso, Lote 15 3800-639 AVEIRO | Portugal T. +351 309 700 225 | F. +351 234 919 191 *GPS <http://maps.google.com/maps/ms?msa=0&msid=202333747613191340808.0004b4b227a6144f0df88> | www.wavecom.pt <http://www.wavecom.pt/>** <http://www.wavecom.pt/>* [image: Description: Description: WavecomSignature] <http://www.wavecom.pt/pt/wavecom/premios.php> [image: Publicity] <http://www.wavecom.pt/pt/mail_eventos.php> On Thu, Aug 21, 2014 at 12:03 AM, Joseph L. Casale < jcasale@activenetwerx.com> wrote:
2014-08-18 07:03:26.341145 [ERR] mod_python.c:293 Error calling python script 2014-08-18 07:03:26.341145 [ERR] mod_python.c:164 Python Error by calling script "stable.disa": <type 'exceptions.AttributeError'> Message: 'PySwigObject' object has no attribute 'sleep'
This only happens with the first call after a restart. After that everything works fine. I never saw this in FS 1.2
Can you post come code? I am guessing you can probably add in some retry logic for whatever situation causes the object to not have the expected attribute... _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
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
Hi Joseph.
Nop. Retry logic isn't the solution here. That's sweeping dirt under the rug kind of solution. This happens with an all bunch of scripts that i was using flawlessly in FS 1.2 Maybe it is time to open a jira for this.
Not knowing anything about your setup, I certainly cant assert but that generalization is fair to apply broadly. Given the case of a service that is long running yet makes api requests to some remote/foreign interface it will likely expire its authentication handle routinely and therefor needs logic to re-establish this when that occurs. Post back your solution when you do find it, I have a project waiting on getting mod_python compiled under windows which I have not been able to do so in the meantime I hoping to acquire as much knowledge on the topic as I can... jlc
A jira is probably the best plan here. Could you also git bisect and try to find out when this was broken? Without that, it will be tricky to track down the issue. On Aug 21, 2014, at 11:31 PM, Nuno Reis <nreis@wavecom.pt> wrote:
Hi Joseph.
Nop. Retry logic isn't the solution here. That's sweeping dirt under the rug kind of solution. This happens with an all bunch of scripts that i was using flawlessly in FS 1.2 Maybe it is time to open a jira for this.
Thanks anyway. BR,
--
Nuno Miguel Reis | Unified Communication Systems M. +351 913907481 | nreis@wavecom.pt
WAVECOM-Soluções Rádio, S.A. Cacia Park | Rua do Progresso, Lote 15 3800-639 AVEIRO | Portugal T. +351 309 700 225 | F. +351 234 919 191 GPS | www.wavecom.pt
<image001.png>
On Thu, Aug 21, 2014 at 12:03 AM, Joseph L. Casale <jcasale@activenetwerx.com> wrote:
2014-08-18 07:03:26.341145 [ERR] mod_python.c:293 Error calling python script 2014-08-18 07:03:26.341145 [ERR] mod_python.c:164 Python Error by calling script "stable.disa": <type 'exceptions.AttributeError'> Message: 'PySwigObject' object has no attribute 'sleep'
This only happens with the first call after a restart. After that everything works fine. I never saw this in FS 1.2
Can you post come code? I am guessing you can probably add in some retry logic for whatever situation causes the object to not have the expected attribute...
participants (3)
-
Joseph L. Casale
-
Michael Jerris
-
Nuno Reis