redhatmailing-listmailman

How to fix Mailman Bug when Admin Login?


 [----- Mailman Version: 2.1.9 -----] 
 [----- Traceback ------] 
Traceback (most recent call last):
 File "/usr/lib/mailman/scripts/driver", line 101, in run_main
 main()

 File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 197, in main
show_results(mlist, doc, category, subcat, cgidata)

File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 521, in show_results
  form.AddItem(show_variables(mlist, category, subcat, cgidata, doc))

   File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 570, in show_variables
    add_options_table_item(mlist, category, subcat, table, item)

   File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 585, in add_options_table_item
     val = get_item_gui_value(mlist, category, kind, varname, params, extra)

 File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 624, in get_item_gui_value
   value = getattr(mlist, varname)

  File "/usr/lib/mailman/Mailman/MailList.py", line 146, in __getattr__
AttributeError: from_is_list

I trying login to Admin by throwed error: Bug in Mailman version 2.1.9

We're sorry, we hit a bug! Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs. Please help me fix it! Thanks


Solution

  • The following answer was given here by Mark Sapiro:

    There is an issue with the list's data_version attribute vs. Mailman.Version.DATA_FILE_VERSION. When the from_is_list and other new attributes were added, Mailman.Version.DATA_FILE_VERSION was incremented to make it greater than the list's data_version attribute which in turn will cause the lists to be updated the first time they are instantiated.

    Perhaps you had some other patches that incremented Mailman.Version.DATA_FILE_VERSION, so that the list's data_version attribute was not < Mailman.Version.DATA_FILE_VERSION causing the update to be skipped.

    The way to fix this is to set Mailman.Version.DATA_FILE_VERSION to a value greater than the data_version attribute of the lists.

    First run this bash script

    for l in `/path/to/mailman/bin/list_lists --bare`
    do
      /path/to/mailman/bin/dumpdb /path/to/mailman/lists/$l/config.pck |
      grep data_version
    done
    

    This will print the data_version for each list. If N is the largest such value, edit Mailman/Version.py to change the line

    DATA_FILE_VERSION = 104
    

    to set a value > N. Then visit the listinfo overview page which should update all the lists.

    Then so this doesn't happen again, set DATA_FILE_VERSION back to 104 in Mailman/Version.py and create a file containing the single line

    mlist.data_version = 104
    

    and run this bash script

    cd /path/to/mailman/bin/
    for l in `./list_lists --bare`
    do
      ./config_list -i /path/to/above/file $l
    done
    

    That should fix things.

    -- Mark Sapiro m...@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan