[Mailman-Users] TypeError: list objects are unhashable

Mark Sapiro mark at msapiro.net
Wed Jan 19 22:43:09 CET 2011


Joshua J. Kugler wrote:

>On Wednesday 19 January 2011, Mark Sapiro elucidated thus:
>> 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 wrong.
>> >
>> >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
>> dictionary.
>
>Actually, wouldn't 'lang' be the culprit here, as that is what is not
>hashable?


Yes, my bad. So, back to the original issue.

I suspect this error occurs because somehow this list's language has
been set to a list of languages rather than a single language.

If you view the source of the list's listinfo page, you should see near
the end something like

	<FORM Method=POST ACTION="../options/LISTNAME">
	To unsubscribe from LISTNAME, get a password reminder,
        or change your subscription options enter your subscription
        email address:
        <p><center> <INPUT name="email" type="TEXT" value="" size="30"
>  <INPUT name="UserOptions" type="SUBMIT" value="Unsubscribe or edit
options" ><INPUT name="language" type="HIDDEN" value="en" ></center>
If you leave the field blank, you will be prompted for
        your email address
		</FORM>

What is the value in the <INPUT name="language" type="HIDDEN" value= >
element?

-- 
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