UnicodeEncodeError submitting admin request

Bug #266029 reported by Kiap
2
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/nlbdsmorg/scripts/driver", line 87, in
run_main
    main()
  File "/var/mailman/nlbdsmorg/Mailman/Cgi/admindb.py",
line 163, in main
    process_form(mlist, doc, cgidata)
  File "/var/mailman/nlbdsmorg/Mailman/Cgi/admindb.py",
line 694, in
process_form
    forward, forwardaddr)
  File "/var/mailman/nlbdsmorg/Mailman/ListAdmin.py", line
184, in
HandleRequest
    forward, addr)
  File "/var/mailman/nlbdsmorg/Mailman/ListAdmin.py", line
373, in
__handlepost
    syslog('vette', note)
  File "/var/mailman/nlbdsmorg/Mailman/Logging/Syslog.
py", line 40, in write
    self.write_ex(kind, msg, args, kws)
  File "/var/mailman/nlbdsmorg/Mailman/Logging/Syslog.
py", line 58, in
write_ex
    logf.write(msg + '\n')
  File
"/var/mailman/nlbdsmorg/Mailman/Logging/StampedLogger.
py", line 73,
in write
    Logger.write(self, "%s %s" % (prefix, msg))
  File "/var/mailman/nlbdsmorg/Mailman/Logging/Logger.
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+admin=2802000000690d3539407328000000
35313635333439656563666564
306432636330623136376634653138666139366537323037
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/prod/nl-bdsm.
org/bvj-operators
SERVER_PORT 80
SERVER_ADDR 212.238.194.176
DOCUMENT_ROOT /var/www/prod/nl-bdsm.org
PYTHONPATH /var/mailman/nlbdsmorg
SCRIPT_FILENAME
/var/mailman/nlbdsmorg/cgi-bin/admindb
SERVER_ADMIN <email address hidden>
HTTP_HOST nl-bdsm.org
HTTP_CACHE_CONTROL no-cache
REQUEST_URI /mailman/admindb/bvj-operators
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword,
application/x-shockwave-flash, */*
HTTP________ ~~~~:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 1245
HTTP_ACCEPT_LANGUAGE nl
CONTENT_TYPE application/x-www-form-urlencoded

[http://sourceforge.net/tracker/index.php?func=detail&aid=902646&group_id=103&atid=100103]

Tags: web-cgi
Revision history for this message
Evarlast-users (evarlast-users) wrote :

looks like the email message has some unicode characters and
the handlers aren't working properly.

I implemented this work around in
/usr/lib/mailman/Mailman/Logging (or equiv) to just disable
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
+++ Logger.py 2004-08-20 17:23:50.501714186 -0400
@@ -84,8 +84,8 @@
             f.flush()

     def write(self, msg):
- if isinstance(msg, StringType):
- msg = unicode(msg, self.__encoding)
+ #if isinstance(msg, StringType):
+ # msg = unicode(msg, self.__encoding)
         f = self.__get_f()
         try:
             f.write(msg)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.