[sr-dev] [kamailio/kamailio] kemi python3: exception occur when import logging module (#2885)

aalba6675 notifications at github.com
Thu Nov 4 17:06:11 CET 2021


@hnimminh  diff for you to try

```
diff --git a/src/modules/app_python3/app_python3_mod.c b/src/modules/app_python3/app_python3_mod.c
index 0ce93b71cd..168e1a0f0a 100644
--- a/src/modules/app_python3/app_python3_mod.c
+++ b/src/modules/app_python3/app_python3_mod.c
@@ -163,6 +163,9 @@ static int mod_init(void)
                LM_ERR("failed to load python script\n");
                return -1;
        }
+#if PY_VERSION_HEX >= 0x03070000
+       PyOS_BeforeFork();
+#endif
 
        pkg_free(dname_src);
        pkg_free(bname_src);
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2885#issuecomment-961188973
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211104/dc8cef82/attachment.htm>


More information about the sr-dev mailing list