Issue 8795: Error sending utf8 strings over syslog udp protocol (original) (raw)

Created on 2010-05-23 11:28 by skliarie, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
logger_udp_utf8.py skliarie,2010-05-23 11:28 python script to simulate logs sending
Messages (4)
msg106330 - (view) Author: Arie Skliarouk (skliarie) Date: 2010-05-23 11:28
I am trying to send utf8 strings over syslog/udp and get strange error: Traceback (most recent call last): File "/usr/lib/python2.6/logging/handlers.py", line 788, in emit self.socket.sendto(msg, self.address) TypeError: sendto() takes exactly 3 arguments (2 given) See the attached program, at the beginning it has two parameters - log to file or udp and use utf8 or not. It works in all cases but the udp+utf8.
msg106348 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2010-05-24 09:43
The message is a misleading one which seems to happen because a Unicode object is passed to the socket. This was fixed in trunk in r75586 (21 October 2009). I've now backported it to release26-maint (r81494).
msg106352 - (view) Author: Arie Skliarouk (skliarie) Date: 2010-05-24 11:26
How come the fix from October 21 have not got into Python 2.6.5 that is packaged into ubuntu 10.04? I overwrote the handlers.py from existing python 2.6.5 installation with the patched version and verified that utf8-encoded logs pass properly now. Thank you!
msg106361 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2010-05-24 13:02
----- Original Message ---- > From: Arie Skliarouk <report@bugs.python.org> > How come the fix from October 21 have not got into Python 2.6.5 > that is packaged into ubuntu 10.04? Not all bug-fixes are automatically backported from trunk to release26-maint branch, which is where 2.6.x releases come from. If someone reports a problem, then I would certainly look to see if a backport is feasible, and this time it was :-)
History
Date User Action Args
2022-04-11 14:57:01 admin set github: 53041
2010-05-24 13:02:00 vinay.sajip set messages: +
2010-05-24 11:26:36 skliarie set messages: +
2010-05-24 09:43:57 vinay.sajip set status: open -> closedresolution: fixedmessages: +
2010-05-23 11:44:53 pitrou set assignee: vinay.sajipnosy: + vinay.sajip
2010-05-23 11:28:42 skliarie create