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.
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).
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!
----- 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: +