Gordon,

The link instructions you gave do not say that no loading is required. It says 
that no *other* modules are required to be loaded *before* this one, meaning it 
has no dependencies. All modules must be loaded before they can be used.

You must still load the python module in order to use it:
loadmodule “python.so”

Ben Newlin

From: Users <users-boun...@lists.opensips.org> on behalf of Gordon Yeong 
<anexi...@gmail.com>
Reply-To: OpenSIPS users mailling list <users@lists.opensips.org>
Date: Wednesday, May 13, 2020 at 9:10 AM
To: OpenSIPS users mailling list <users@lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Can't seem to get python module to work

Anyone know what's going on?

Gordon


On Tue, 12 May 2020 at 17:10, Gordon Yeong 
<anexi...@gmail.com<mailto:anexi...@gmail.com>> wrote:
hi guys
 I managed to get opensips to work with the perl module.
I now need to port what I have to python 3.


I can't seem to start opensips 3.0 because I have the following error:


May 12 16:59:51 [47532] ERROR:core:set_mod_param_regex: no module matching 
python found
May 12 16:59:51 [47532] Traceback (last included file at the bottom):
May 12 16:59:51 [47532]  0. /opt/opensips/etc/opensips/opensips-Enum-Python.cfg
May 12 16:59:51 [47532] CRITICAL:core:yyerror: parse error in 
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:137:20-21: Parameter 
<script_name> not found in module <python> - can't set
May 12 16:59:51 [47532]
May 12 16:59:51 [47532] loadmodule "enum.so"
May 12 16:59:51 [47532] modparam("python", "script_name", "/tmp/test.py")
May 12 16:59:51 [47532] ^~
May 12 16:59:51 [47532]
May 12 16:59:51 [47532] ####### Routing Logic ########
May 12 16:59:51 [47532] CRITICAL:core:yyerror: parse error in 
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:158:36-37: unknown command 
<python_exec>, missing loadmodule?
May 12 16:59:51 [47532] CRITICAL:core:yyerror: parse error in 
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:159:54-55: unknown command 
<python_exec>, missing loadmodule?
May 12 16:59:51 [47532] ERROR:core:parse_opensips_cfg: bad config file (3 
errors)
May 12 16:59:51 [47532] ERROR:core:main: failed to parse config file 
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg
May 12 16:59:51 [47532] NOTICE:core:main: Exiting....

1) the first issue is "ERROR:core:set_mod_param_regex: no module matching 
python found".
    I find this really weird because I referred to 
https://opensips.org/docs/modules/3.0.x/python.html<https://opensips.org/docs/modules/3.0.x/python.html>
 and it says in 1.2.1.  that no loading is required.

2) Additionally, I am using the  line "modparam("python", "script_name", 
"/tmp/test.py")" to load my test python functions as per the same documentation 
in section 1.3.1.
    Yet, it errors out, "CRITICAL:core:yyerror: parse error in 
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:137:20-21: Parameter 
<script_name> not found in module <python> - can't set".

Any ideas?

Thank you


Regards,
Gordon Yeong
perl, python3, elixir, rails, php = joy
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to