AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'

Bug #192932 reported by Patrick Ancillotti
60
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mailman (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: mailman

Hi Guys,

The mailman installation fails on hardy with the following :

root@xxx:~# aptitude install mailman
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  pwgen
The following NEW packages will be installed:
  mailman pwgen
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 8609kB/8629kB of archives. After unpacking 40.7MB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Get:1 http://archive.ubuntu.com hardy/main mailman 1:2.1.9-9 [8609kB]
Fetched 8609kB in 0s (10.0MB/s)
Preconfiguring packages ...
Selecting previously deselected package pwgen.
(Reading database ... 39855 files and directories currently installed.)
Unpacking pwgen (from .../archives/pwgen_2.06-1_i386.deb) ...
Selecting previously deselected package mailman.
Unpacking mailman (from .../mailman_1%3a2.1.9-9_i386.deb) ...
Setting up pwgen (2.06-1) ...
Setting up mailman (1:2.1.9-9) ...
Looking for enabled languages (this may take some time) ... done.
Installing site language en ............................................ done.
Configuring mailman for domain -e false ...
sed: -e expression #1, char 32: unterminated `s' command
dpkg: error processing mailman (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 mailman
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mailman (1:2.1.9-9) ...
Looking for enabled languages (this may take some time) ... done.
Traceback (most recent call last):
  File "/var/lib/mailman/bin/list_lists", line 47, in <module>
    from Mailman import MailList
  File "/var/lib/mailman/Mailman/MailList.py", line 45, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
Installing site language en ............................................ done.
Traceback (most recent call last):
  File "/usr/lib/mailman/bin/update", line 50, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
Traceback (most recent call last):
  File "/var/lib/mailman/bin/list_lists", line 47, in <module>
    from Mailman import MailList
  File "/var/lib/mailman/Mailman/MailList.py", line 45, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
 * Site list for mailman (usually named mailman) missing.
 * Please create it; until then, mailman will refuse to start.
WARNING: I/O error while trying to byte-compile /usr/lib/mailman/bin/postfix-to-mailman.py (2): No such file or directory
WARNING: I/O error while trying to byte-compile /usr/lib/mailman/bin/qmail-to-mailman.py (2): No such file or directory

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done

the following is the package information:

root@xxx:~# aptitude show mailman
Package: mailman
State: installed
Automatically installed: yes
Version: 1:2.1.9-9
Priority: optional
Section: mail
Maintainer: Ubuntu Core Developers <email address hidden>
Uncompressed Size: 40.6M
Depends: libc6 (>= 2.6.1-1), python (>= 2.3), python-support (>= 0.7.1), logrotate, cron, exim4 |
         mail-transport-agent, apache2 | httpd, ucf, pwgen, adduser, lsb-base (>= 3.0-6)
PreDepends: debconf | debconf-2.0
Suggests: spamassassin, lynx, listadmin
Description: Powerful, web-based mailing list manager
 The GNU Mailing List Manager, which manages email discussion lists much like Majordomo and Smartmail. Unlike most
 similar products, Mailman gives each mailing list a web page, and allows users to subscribe, unsubscribe, etc. over
 the web. Even the list manager can administer his or her list entirely from the web.

 Mailman also integrates most things people want to do with mailing lists, including archiving, mail <-> news
 gateways, and so on. It has all of the features you expect from such a product, plus integrated support for the web
 (including web based archiving), automated bounce handling and integrated spam prevention.

If you need anymore help, feel free to shout.

Patrick

Revision history for this message
Ernst Persson (ernstp) wrote :

Same in feisty and gutsy after security update.

Revision history for this message
Ernst Persson (ernstp) wrote :

Sorry, this wasn't a dupe. Looked too quickly on the backtraces.

Revision history for this message
nodata (ubuntu-nodata) wrote :

Broken for me since mailman security update today. All my mailing lists are now broken.

Revision history for this message
nodata (ubuntu-nodata) wrote :

The problem is this:

        elif property == 'subject_prefix':
            # Convert any html entities to Unicode
            mlist.subject_prefix = Utils.canonstr(
        elif property == 'info':
            if val <> mlist.info:

in /usr/lib/mailman/Mailman/Gui/General.py
The line beginning "mlist" is completely wrong.

A patch gone wrong?

Revision history for this message
nodata (ubuntu-nodata) wrote :

This also affects 1:2.1.9-8ubuntu0.1

The workaround is to replace General.py with the unbroken version, for me t this was found in http://ftp.gnu.org/gnu/mailman/mailman-2.1.9.tgz

Revision history for this message
Kees Cook (kees) wrote :

Are you able to reproduce this problem with the current Hardy mailman? A fresh install does not fail for me. Did you already have lists configured?

Changed in mailman:
assignee: nobody → keescook
status: New → Incomplete
Revision history for this message
nodata (ubuntu-nodata) wrote :

I upgraded in Gutsy without a problem. 1:2.1.9-8ubuntu0.2 wfm.

Revision history for this message
LifeSF (lifesf) wrote : Re: [Bug 192932] Re: installation fails: post-install script failure
Download full text (6.0 KiB)

Hardy had to be removed from my pc for various reasons; so I cannot say why
mailman didn't work. I had tried complete removal afterwards and re-install
but nothing has worked. It would have been nice if it did though but i will
not be running hardy on this pc; i will install hardy on my server in a
couple of weeks and if encounter the same problem i will make sure to post
the bug information.

On Sat, Mar 15, 2008 at 9:10 PM, Kees Cook <email address hidden> wrote:

> Are you able to reproduce this problem with the current Hardy mailman?
> A fresh install does not fail for me. Did you already have lists
> configured?
>
> ** Changed in: mailman (Ubuntu)
> Assignee: (unassigned) => Kees Cook (keescook)
> Status: New => Incomplete
>
> --
> installation fails: post-install script failure
> https://bugs.launchpad.net/bugs/192932
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Source Package "mailman" in Ubuntu: Incomplete
>
> Bug description:
> Binary package hint: mailman
>
> Hi Guys,
>
> The mailman installation fails on hardy with the following :
>
> root@xxx:~# aptitude install mailman
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Reading extended state information
> Initializing package states... Done
> Building tag database... Done
> The following NEW packages will be automatically installed:
> pwgen
> The following NEW packages will be installed:
> mailman pwgen
> 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
> Need to get 8609kB/8629kB of archives. After unpacking 40.7MB will be
> used.
> Do you want to continue? [Y/n/?]
> Writing extended state information... Done
> Get:1 http://archive.ubuntu.com hardy/main mailman 1:2.1.9-9 [8609kB]
> Fetched 8609kB in 0s (10.0MB/s)
> Preconfiguring packages ...
> Selecting previously deselected package pwgen.
> (Reading database ... 39855 files and directories currently installed.)
> Unpacking pwgen (from .../archives/pwgen_2.06-1_i386.deb) ...
> Selecting previously deselected package mailman.
> Unpacking mailman (from .../mailman_1%3a2.1.9-9_i386.deb) ...
> Setting up pwgen (2.06-1) ...
> Setting up mailman (1:2.1.9-9) ...
> Looking for enabled languages (this may take some time) ... done.
> Installing site language en ............................................
> done.
> Configuring mailman for domain -e false ...
> sed: -e expression #1, char 32: unterminated `s' command
> dpkg: error processing mailman (--configure):
> subprocess post-installation script returned error exit status 1
> Errors were encountered while processing:
> mailman
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> A package failed to install. Trying to recover:
> Setting up mailman (1:2.1.9-9) ...
> Looking for enabled languages (this may take some time) ... done.
> Traceback (most recent call last):
> File "/var/lib/mailman/bin/list_lists", line 47, in <module>
> from Mailman import MailList
> File "/var/lib/mailman/Mailman/MailList.py", line 45, in <module>
> from Mailman import Utils
> File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
> def MakeRa...

Read more...

Revision history for this message
Patrick Ancillotti (patricka) wrote :
Download full text (3.7 KiB)

Todays sync brings us pretty much the same issue:

neogenix@xxx:~$ sudo aptitude install mailman
[sudo] password for neogenix:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  pwgen
The following NEW packages will be installed:
  mailman pwgen
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 8612kB/8631kB of archives. After unpacking 40.7MB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Get:1 http://archive.ubuntu.com hardy/main mailman 1:2.1.9-9ubuntu1 [8612kB]
Fetched 8612kB in 0s (9676kB/s)
Preconfiguring packages ...
Selecting previously deselected package pwgen.
(Reading database ... 45877 files and directories currently installed.)
Unpacking pwgen (from .../archives/pwgen_2.06-1_i386.deb) ...
Selecting previously deselected package mailman.
Unpacking mailman (from .../mailman_1%3a2.1.9-9ubuntu1_i386.deb) ...
Setting up pwgen (2.06-1) ...
Setting up mailman (1:2.1.9-9ubuntu1) ...
Looking for enabled languages (this may take some time) ... done.
Installing site language en ............................................ done.
Configuring mailman for domain -e false ...
sed: -e expression #1, char 32: unterminated `s' command
dpkg: error processing mailman (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 mailman
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mailman (1:2.1.9-9ubuntu1) ...
Looking for enabled languages (this may take some time) ... done.
Traceback (most recent call last):
  File "/var/lib/mailman/bin/list_lists", line 47, in <module>
    from Mailman import MailList
  File "/var/lib/mailman/Mailman/MailList.py", line 45, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
Installing site language en ............................................ done.
Traceback (most recent call last):
  File "/usr/lib/mailman/bin/update", line 50, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
Traceback (most recent call last):
  File "/var/lib/mailman/bin/list_lists", line 47, in <module>
    from Mailman import MailList
  File "/var/lib/mailman/Mailman/MailList.py", line 45, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
 * Site list for mailman (usually named mailman) missing.
 * Please create it; until then, ma...

Read more...

Revision history for this message
LifeSF (lifesf) wrote : lifesf@gmail.com has invited you to have a 3D avatar chat

                                                                                                                                    From: Steve Avatar: Guest_LifeSF To: Bug Hey Bug,Steve has added you as a friend on IMVU. Is Steve your friend? &nbsp; Please respond or Steve may think you said no :) IMVU is the world's greatest 3D chat! Dress up your Avatar with 3D clothes. Chat with your friends &amp; meet new ones. Decorate your own 3D Room with furniture. FREE to download &amp; use! http://www.imvu.com Copyright &copy; 2006-2007 IMVU, Inc. 411 High Street, Palo Alto, CA 94301. This email was sent via IMVU by Steve (<email address hidden>) to <email address hidden>. If you want to prevent any future emails from IMVU, you can remove yourself by pointing your web browser to http://www.imvu.com/catalog/web_nonregisteredoptout.php?code=aca74a&<email address hidden>. Your unsubscribe confirmation code is aca74a

Revision history for this message
Patrick Ancillotti (patricka) wrote :
Download full text (4.7 KiB)

Hi Guys,

Did a run again today:

(clean install of mailman)

root@plonker:~# aptitude install mailman
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  pwgen
The following NEW packages will be installed:
  mailman pwgen
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 8612kB/8631kB of archives. After unpacking 40.7MB will be used.
Do you want to continue? [Y/n/?] Y
Writing extended state information... Done
Get:1 http://archive.ubuntu.com hardy/main mailman 1:2.1.9-9ubuntu1 [8612kB]
Fetched 8612kB in 0s (10.8MB/s)
Preconfiguring packages ...
Selecting previously deselected package pwgen.
(Reading database ... 48650 files and directories currently installed.)
Unpacking pwgen (from .../archives/pwgen_2.06-1_i386.deb) ...
Selecting previously deselected package mailman.
Unpacking mailman (from .../mailman_1%3a2.1.9-9ubuntu1_i386.deb) ...
Setting up pwgen (2.06-1) ...
Setting up mailman (1:2.1.9-9ubuntu1) ...
Looking for enabled languages (this may take some time) ... done.
Installing site language en ............................................ done.
Configuring mailman for domain -e false ...
sed: -e expression #1, char 32: unterminated `s' command
dpkg: error processing mailman (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 mailman
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mailman (1:2.1.9-9ubuntu1) ...
Looking for enabled languages (this may take some time) ... done.
Traceback (most recent call last):
  File "/var/lib/mailman/bin/list_lists", line 47, in <module>
    from Mailman import MailList
  File "/var/lib/mailman/Mailman/MailList.py", line 45, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
Installing site language en ............................................ done.
Traceback (most recent call last):
  File "/usr/lib/mailman/bin/update", line 50, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
Traceback (most recent call last):
  File "/var/lib/mailman/bin/list_lists", line 47, in <module>
    from Mailman import MailList
  File "/var/lib/mailman/Mailman/MailList.py", line 45, in <module>
    from Mailman import Utils
  File "/var/lib/mailman/Mailman/Utils.py", line 351, in <module>
    def MakeRandomPassword(length=mm_cfg.MEMBER_PASSWORD_LENGTH):
AttributeError: 'module' object has no attribute 'MEMBER_PASSWORD_LENGTH'
 * Site list for mailman (usually named mailman) missing.
 * Please create it; until then, mailman will refuse to s...

Read more...

Changed in mailman:
status: Incomplete → Confirmed
Revision history for this message
Kees Cook (kees) wrote :

I am still unable to reproduce this problem.

Changed in mailman:
assignee: kees → nobody
status: Confirmed → Incomplete
Revision history for this message
icarito (sebastian-fuentelibre) wrote :

I copied suggestion from http://ubuntuforums.org/showthread.php?t=524564 - added

from Defaults import *

to mm_cfg.py and suddently it works as expected.

(mm_cfg.py is empty on new instalation)

Cheers

Revision history for this message
SEWilco (scot-wilcoxon) wrote :

Still present in Intrepid.
The file /etc/mailman/mm_cfg.py is empty and seems to need:

from Defaults import *

Also, there is a 'sed' error message during initial installation.
The 'sed' error does not appear when mailman is removed and re-installed.
But the required 'newlist mailman' fails for unknown reasons -- the newlist command starts running then emits what seems to be its --help message.

Revision history for this message
SEWilco (scot-wilcoxon) wrote :

People trying to remove the package: Notice that apt-get remove will fail without the "from Defaults import *" workaround, but the remove will leave files scattered around the system, including init.d and cron files.

I don't know if the Defaults workaround is relevant to fixing the several problems with the package.

Mailman is being widely used, including for the Ubuntu mailing lists.

Revision history for this message
Thierry Carrez (ttx) wrote :

Looks like a duplicate of bug 229487 (or the other way around)

Revision history for this message
Peeyush Chandel (cpeeyush) wrote :

thanks icarito

your answer solved my problem

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mailman (Ubuntu) because there has been no activity for 60 days.]

Changed in mailman (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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