[Mailman-Users] TypeError: list objects are unhashable

Mark Sapiro mark at msapiro.net
Wed Jan 19 17:19:30 CET 2011

Alain Williams wrote:
>The traceback is below, since I don't speak python it doesn't mean much to me.
>The list works, but the error below appears when anyone enters their email address
>and tries to see their subscrition options.
>I would be grateful if someone could give me some pointers as to what I have done
>Many thanks.
>admin(21868): [----- Mailman Version: 2.1.9 -----] 
>admin(21868): [----- Traceback ------] 
>admin(21868): Traceback (most recent call last):
>admin(21868):   File "/usr/local/mailman/fridayfolk/scripts/driver", line 101, in run_main
>admin(21868):     main()
>admin(21868):   File "/usr/local/mailman/fridayfolk/Mailman/Cgi/options.py", line 93, in main
>admin(21868):     if not Utils.IsLanguage(language):
>admin(21868):   File "/usr/local/mailman/fridayfolk/Mailman/Utils.py", line 678, in IsLanguage
>admin(21868):     return mm_cfg.LC_DESCRIPTIONS.has_key(lang)
>admin(21868): TypeError: list objects are unhashable

Someone has (hopefully in mm_cfg.py, but possibly by editing
Defaults.py) redefined LC_DESCRIPTIONS as a list instead of a

If you don't know how to fix this, post your mm_cfg.py, and, if you've
made changes to Defaults.py, see the FAQ at
<http://wiki.list.org/x/fIA9> and post those too.

Note that in any case, if you have something like


in mm_cfg.py, that is wrong on two counts. LC_DESCRIPTIONS is a
dictionary and an empty dictionary is {}, not [], and if
LC_DESCRIPTIONS is redefined in mm_cfg.py, add_language() will still
update the original dictionary.

The correct thing to put in mm_cfg.py for Mailman 2.1.9 if you want say
English as the only language is

add_language('en', 'English (USA)', 'us-ascii')

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list