UnicodeEncodeError submitting admin request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
New
|
Medium
|
Unassigned |
Bug Description
When submitting an admin request to have a number of
addresses set to 'Ignore' processing the list of mails
received from addresses not subscribed to the list, the
following error is received by the list moderator. I have
confirmed that the same error occurs with the site admin
password.
Bug in Mailman version 2.1.4
We're sorry, we hit a bug!
If you would like to help us identify the problem, please
email a copy of
this page to the webmaster for this site with a
description of what
happened. Thanks!
Traceback:
Traceback (most recent call last):
File "/var/mailman/
run_main
main()
File "/var/mailman/
line 163, in main
process_
File "/var/mailman/
line 694, in
process_form
forward, forwardaddr)
File "/var/mailman/
184, in
HandleRequest
forward, addr)
File "/var/mailman/
373, in
__handlepost
syslog('vette', note)
File "/var/mailman/
py", line 40, in write
self.
File "/var/mailman/
py", line 58, in
write_ex
logf.write(msg + '\n')
File
"/var/mailman/
py", line 73,
in write
Logger.
File "/var/mailman/
py", line 91, in write
f.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character
u'\xe9' in position
116: ordinal not in range(128)
-------
-------
----
Python information:
Variable Value
sys.version 2.3.3 (#1, Jan 23 2004, 17:15:25) [GCC 2.95.
3 20010315
(release)]
sys.executable /usr/bin/python
sys.prefix /usr
sys.exec_prefix /usr
sys.path /usr
sys.platform linux2
-------
-------
----
Environment variables:
Variable Value
HTTP___
HTTP_COOKIE
bvj-operators+
353136353334396
306432636330623
626334
SERVER_SOFTWARE Apache/1.3.27 (Unix) PHP/4.3.2
mod_ssl/2.8.14
OpenSSL/0.9.7b
SCRIPT_NAME /mailman/admindb
SERVER_SIGNATURE Apache/1.3.27 Server at nl-bdsm.
org Port 80
REQUEST_METHOD POST
PATH_INFO /bvj-operators
SERVER_PROTOCOL HTTP/1.1
QUERY_STRING
CONTENT_LENGTH 891
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; .NET CLR
1.1.4322)
HTTP_CONNECTION Keep-Alive
SERVER_NAME nl-bdsm.org
REMOTE_ADDR 80.126.99.148
PATH_TRANSLATED /var/www/
org/bvj-operators
SERVER_PORT 80
SERVER_ADDR 212.238.194.176
DOCUMENT_ROOT /var/www/
PYTHONPATH /var/mailman/
SCRIPT_FILENAME
/var/mailman/
SERVER_ADMIN <email address hidden>
HTTP_HOST nl-bdsm.org
HTTP_CACHE_CONTROL no-cache
REQUEST_URI /mailman/
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg,
application/
application/msword,
application/
HTTP________ ~~~~:
~~~~~~~
~~~~~~~~
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 1245
HTTP_ACCEPT_
CONTENT_TYPE application/
[http://
looks like the email message has some unicode characters and
the handlers aren't working properly.
I implemented this work around in mailman/ Mailman/ Logging (or equiv) to just disable
/usr/lib/
the unicode message conversion. In all honesty, I couldn't
find where this log was being written anyway, but
admittedly, I only spend 5 min or so with it.
--- Logger.py~ 2004-08-20 17:23:46.597760277 -0400
f. flush()
+++ Logger.py 2004-08-20 17:23:50.501714186 -0400
@@ -84,8 +84,8 @@
def write(self, msg):
f. write(msg)
- if isinstance(msg, StringType):
- msg = unicode(msg, self.__encoding)
+ #if isinstance(msg, StringType):
+ # msg = unicode(msg, self.__encoding)
f = self.__get_f()
try: