[SR-Users] KEMI routing script Python exceptions with empty traceback

Anthony Alba ascanio.alba7 at gmail.com
Tue Jun 19 02:09:56 CEST 2018


On Mon, Jun 18, 2018 at 12:05:34PM -0400, Michael Loughrey wrote:
> 
> 
> kamailio[2242]:  8(2253) ERROR: app_python [python_support.c:150]:
> python_handle_exception(): python_exec2: Unhandled exception in the Python
> code:
> kamailio[2242]: TypeError: an integer is required
> 

Hi Michael,

This is usually a symptom of a ksr_* method having a code path which exits
the function without returning an integer value (1 for success, 0 for immediate
exit, and < 0 for failure) — the equivalent of a None return value. That might
be the cause of the TypeError.

Can you ensure that all your ksr_* methods have an integer return value no
matter how they return.

If this doesn't work, are you able to share your routing script?

Regards

Anthony



More information about the sr-users mailing list