[Mailman-Users] "TypeError: not all arguments" converted with check_perms

Richard Barrett r.barrett at openinfo.co.uk
Tue Feb 17 02:19:21 CET 2004

On 17 Feb 2004, at 00:00, Olson, Gary wrote:

> Hi,
> I just did a new install of mailman v.2.0.13-1 on a redhat v.7.3 
> system.  When editing Mailman/mm_cfg.py and then running 
> bin/check_perms, I get the following error:
> # bin/check_perms
> Traceback (innermost last):
> File "bin/check_perms", line 46, in ?
> 	from Mailman import mm_cfg
> File "/var/mailman/Mailman/mm_cfg.py", line 60, in ?
> 	DEFAULT_URL = '<http://www.mydomain.net/mailman/'> % DEFAULT_HOST_NAME

Assuming you have defined DEFAULT_HOST_NAME = 'www.mydomain.net', you 
probably want to say:

    DEFAULT_URL = 'http://%s/mailman/' % DEFAULT_HOST_NAME

Or you could say:

    DEFAULT_URL = 'http://www.mydomain.net/mailman/'

But you definitely do not want to say:

    DEFAULT_URL = '<http://%s/mailman/>' % DEFAULT_HOST_NAME

> TypeError: not all arguments converted
> What is causing this error?

The exception is Python complaining about a problem in string 
formatting. You gave it a variable to interpolate into a string (that 
is what the % operator is for) but you did not put anything in the 
string to say where to put the variable's value (the missing %s)

The < and > (greater than and less than) in/near the string are plain 
wrong as well and should have generated 'SyntaxError: invalid syntax' 
as presented so I guess you edited the Python output you actually got 
before posting it in your message?

> I'm a newbie to Mailman and Redhat so any help will be appreciated and 
> will need to be clear and basic so I can understand it.

Be aware that mm_cfg.py is a Python language file and you are editing 
Python code. Although fairly clear, be careful about leading 
indentation as this is syntactically significant in Python, unlike many 
other programming/scripting languages.

> Thanks for any help you can provide!
> Gary

More information about the Mailman-Users mailing list