I just installed Mailman on a Solaris 7 system. Python 2.2 wouldn't build so I used an already installed version 1.5.2. I got the following error:
Jul 17 15:42:01 2002 qrunner(15261): File "/usr2/mailman/Mailman/MailCommandHandler.py", line 124, in ParseMailCommands Jul 17 15:42:01 2002 qrunner(15261): ack = msg.get('x-ack', '').lower() Jul 17 15:42:01 2002 qrunner(15261): AttributeError : 'string' object has no attribute 'lower'
I hacked the code and removed ".lower()" which seemed to help. Is this error due to my using the older version of Python? What problems can I expect due to the "hack"?
Thanks,
Tom
At 10:03 19/07/2002 -0500, Tom Lynch wrote:
I just installed Mailman on a Solaris 7 system. Python 2.2 wouldn't build so I used an already installed version 1.5.2. I got the following error:
Jul 17 15:42:01 2002 qrunner(15261): File "/usr2/mailman/Mailman/MailCommandHandler.py", line 124, in ParseMailCommands Jul 17 15:42:01 2002 qrunner(15261): ack = msg.get('x-ack', '').lower() Jul 17 15:42:01 2002 qrunner(15261): AttributeError : 'string' object has no attribute 'lower'
I hacked the code and removed ".lower()" which seemed to help. Is this error due to my using the older version of Python? What problems can I expect due to the "hack"?
Thanks,
Tom
This problem has been the subject of several posts to this list.
Its looks as if in a number of places code has been added that requires Python 2.0 or later, where many of the functions in the string module became available as methods on string objects.
That said, the 2.0.12 README only appears to say that later Python versions are preferred over Python 1.5.2 rather than saying they are required.
You probably need/want to upgrade to either Python 2.1.3 or 2.2.1 to fix your problem.
If you cannot upgrade to a higher version of Python than 1.5.2 then you will have to hack the source code so that where functions like lower have been used directly on string objects you instead call the lower function from the string module with the string objectect as the parameter to the call. For instance in case you have encountered, change:
ack = msg.get('x-ack', '').lower()
to read:
ack = string.lower(msg.get('x-ack', ''))
You may need to import the string module into the file concerened if that isn't already being done i.e. add this to the other imports at the top of the file concerned:
import string
participants (2)
-
Richard Barrett -
Tom Lynch