<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please
use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on
sr-users mailing list:
*
https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask
on sr-dev mailing list:
*
https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
The Python3 modules violate Python's exception handling contract.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
```
KSR.pc.sets("$fU",None)
```
#### Debugging Data
```
Unhandled exception in the Python code:
TypeError: kemi-param-ss() argument 2 must be str, not None
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/kamailio/trace.py", line 212, in
pac
return proc(*a, **k)
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/kamailio/_basic.py", line 181,
in ksr_request_route
self.do_route(msg)
File "/usr/local/lib/python3.11/dist-packages/kamailio/_basic.py", line 261,
in do_route
self.route_static(msg)
File "/usr/local/lib/python3.11/dist-packages/kamailio/_basic.py", line 287,
in route_static
if self.fix_addrs(msg):
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/kamailio/_basic.py", line 334,
in fix_addrs
PV.tU = dnr
^^^^^
File "/usr/local/lib/python3.11/dist-packages/kamailio/var.py", line 46, in
__setattr__
return self.__setitem__(k, v)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/kamailio/var.py", line 73, in
__setitem__
KSR.pv.sets("$fU", v)
SystemError: <built-in function sets> returned a result with an exception set
```
### Possible Solutions
See PR #4044
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
seen with 5.6 and 5.8
```
* **Operating System**:
Debian Stable but doesn't matter
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4045
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4045(a)github.com>