Try to get a core dump file and then get the full backtrace and past it here, it is useful for troubleshooting:
- https://www.kamailio.org/wikidocs/tutorials/troubleshooting/coredumpfile/#ho...
Also, add the snippet of the python code that causes the crash.
On the other hand, you should switch to using app_python3 or app_python3s, the app_python is for Python2 which is no longer supported, so this module might get also deprecated very soon.