Re: [Mailman-Users] weird problems; a cry for help
Argh.
The problem is that George's digest header had the string '% d' in it, and the 'string-mod' operation was trying to treat that as an integer format field. (the text was "10% discount").
Erk. I think this is a Python bug; I think it should not treat '% d' the same as '%d'; but I'm having a hard time discovering anything formally specifying the format of a 'printf-like string interpolation function of the % operator' in the Python documentation; any help appreciated.
But in any event, if anyone sees anything similar, suspect '%' characters in your header/footer text.
George, a workaround seems to be to change that to "10%% discount", but that only works out right if you *know* the '%' operator is going to be applied. In this case, you know it is, so it should be safe.
But make no mistake: Python really blind-sided you on this one, IMO.
I feel like I'm talking to myself. :-) I guess that since no one has responded, this must be too wacked out to diagnose. Should I delete the list and re-create it? If I do that, is there any way to salvage either the member list or the archived messages?
Anxious for a reponse, George
George Dinwiddie said:
I'm a mailman newbie and hardly know where to begin. I've got a couple of lists running at www.alberg30.org in a virtual hosting environment where mailman is shared by all the domains hosted on the machine. Everything was hunky-dory until...
Well, first the ISP had some sort of crash. Then they moved from RedHat 6.0 to 7.0. Somewhere along the line (maybe t the same time) they installed a newer version (or versions) of mailman. I know that it was beta 6 but is now 2.0rc1.
First, I had problems with the "welcome" message being sent with the "Reply-to" header pointing to the list, instead of the admin address. Then all mail stopped. They got one list working again, but the other, the most important one, is really bollixed.
logs/error is filling up with: Oct 25 18:04:00 2000 (32336) Delivery exception: __int__ Oct 25 18:04:00 2000 (32336) Traceback (innermost last): File "/home/mailman/Mailman/Handlers/HandlerAPI.py", line 82, in do_pipeline func(mlist, msg, msgdata) File "/home/mailman/Mailman/Handlers/ToDigest.py", line 121, in process inject_digest(mlist, digestfile, topicsfile) File "/home/mailman/Mailman/Handlers/ToDigest.py", line 170, in inject_digest msg = digest.asMIME() File "/home/mailman/Mailman/Handlers/ToDigest.py", line 242, in asMIME return self.Present(mime=1) File "/home/mailman/Mailman/Handlers/ToDigest.py", line 279, in Present lines.append(self.__mlist.digest_header % self.TemplateRefs()) AttributeError: __int__
logs/digest is filling up with stuff like: Oct 25 18:09:00 2000 (20560) Public-list v 16 - 2035 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:09:00 2000 (20560) Public-list v 16 - 2036 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:09:01 2000 (20560) Public-list v 16 - 2037 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2038 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2039 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2040 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2041 msgs, 22 recips (4 mime, 18 text, 0 disabled)
logs/qrunner has stuff like: Oct 25 16:17:02 2000 (30248) Could not acquire qrunner lock Oct 25 16:18:02 2000 (7653) Could not acquire qrunner lock Oct 25 16:19:01 2000 (14921) Could not acquire qrunner lock Oct 25 16:20:01 2000 (24286) Could not acquire qrunner lock Oct 25 16:21:01 2000 (19783) Could not acquire qrunner lock but I'm not sure it's related to the stuff in logs/digest.
lists/public-list/next-digest is filling up with many copies of a few messages. Likewise, lists/public-list/next-digest-topics is filling up with the same 4 topics in rotation.
Any ideas on what the problem might be? Better yet, any ideas on the fix?
Please copy me on the reply.
Thanks, George Dinwiddie
--
George Dinwiddie gdinwiddie@min.net The gods do not deduct from man's allotted span those hours spent in sailing. NEW URL => http://www.Alberg30.org/
Mailman-Users maillist - Mailman-Users@python.org http://www.python.org/mailman/listinfo/mailman-users
--
George Dinwiddie gdinwiddie@min.net The gods do not deduct from man's allotted span those hours spent in sailing. NEW URL => http://www.Alberg30.org/
Mailman-Users maillist - Mailman-Users@python.org http://www.python.org/mailman/listinfo/mailman-users
Wow! Many thanks for your analysis. Not being a Python programmer, I hadn't even thought about the header being interpreted, which is silly on my part.
Thanks, George
Dan Mick said:
Argh.
The problem is that George's digest header had the string '% d' in it, and the 'string-mod' operation was trying to treat that as an integer format field. (the text was "10% discount").
Erk. I think this is a Python bug; I think it should not treat '% d' the same as '%d'; but I'm having a hard time discovering anything formally specifying the format of a 'printf-like string interpolation function of the % operator' in the Python documentation; any help appreciated.
But in any event, if anyone sees anything similar, suspect '%' characters in your header/footer text.
George, a workaround seems to be to change that to "10%% discount", but that only works out right if you *know* the '%' operator is going to be applied. In this case, you know it is, so it should be safe.
But make no mistake: Python really blind-sided you on this one, IMO.
I feel like I'm talking to myself. :-) I guess that since no one has responded, this must be too wacked out to diagnose. Should I delete the list and re-create it? If I do that, is there any way to salvage either the member list or the archived messages?
Anxious for a reponse, George
George Dinwiddie said:
I'm a mailman newbie and hardly know where to begin. I've got a couple of lists running at www.alberg30.org in a virtual hosting environment where mailman is shared by all the domains hosted on the machine. Everything was hunky-dory until...
Well, first the ISP had some sort of crash. Then they moved from RedHat 6.0 to 7.0. Somewhere along the line (maybe t the same time) they installed a newer version (or versions) of mailman. I know that it was beta 6 but is now 2.0rc1.
First, I had problems with the "welcome" message being sent with the "Reply-to" header pointing to the list, instead of the admin address. Then all mail stopped. They got one list working again, but the other, the most important one, is really bollixed.
logs/error is filling up with: Oct 25 18:04:00 2000 (32336) Delivery exception: __int__ Oct 25 18:04:00 2000 (32336) Traceback (innermost last): File "/home/mailman/Mailman/Handlers/HandlerAPI.py", line 82, in do_pipeline func(mlist, msg, msgdata) File "/home/mailman/Mailman/Handlers/ToDigest.py", line 121, in process inject_digest(mlist, digestfile, topicsfile) File "/home/mailman/Mailman/Handlers/ToDigest.py", line 170, in inject_digest msg = digest.asMIME() File "/home/mailman/Mailman/Handlers/ToDigest.py", line 242, in asMIME return self.Present(mime=1) File "/home/mailman/Mailman/Handlers/ToDigest.py", line 279, in Present lines.append(self.__mlist.digest_header % self.TemplateRefs()) AttributeError: __int__
logs/digest is filling up with stuff like: Oct 25 18:09:00 2000 (20560) Public-list v 16 - 2035 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:09:00 2000 (20560) Public-list v 16 - 2036 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:09:01 2000 (20560) Public-list v 16 - 2037 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2038 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2039 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2040 msgs, 22 recips (4 mime, 18 text, 0 disabled) Oct 25 18:10:01 2000 (1315) Public-list v 16 - 2041 msgs, 22 recips (4 mime, 18 text, 0 disabled)
logs/qrunner has stuff like: Oct 25 16:17:02 2000 (30248) Could not acquire qrunner lock Oct 25 16:18:02 2000 (7653) Could not acquire qrunner lock Oct 25 16:19:01 2000 (14921) Could not acquire qrunner lock Oct 25 16:20:01 2000 (24286) Could not acquire qrunner lock Oct 25 16:21:01 2000 (19783) Could not acquire qrunner lock but I'm not sure it's related to the stuff in logs/digest.
lists/public-list/next-digest is filling up with many copies of a few messages. Likewise, lists/public-list/next-digest-topics is filling up with the same 4 topics in rotation.
Any ideas on what the problem might be? Better yet, any ideas on the fix?
Please copy me on the reply.
Thanks, George Dinwiddie
--
George Dinwiddie gdinwiddie@min.net The gods do not deduct from man's allotted span those hours spent in sailing. NEW URL => http://www.Alberg30.org/
Mailman-Users maillist - Mailman-Users@python.org http://www.python.org/mailman/listinfo/mailman-users
--
George Dinwiddie gdinwiddie@min.net The gods do not deduct from man's allotted span those hours spent in sailing. NEW URL => http://www.Alberg30.org/
Mailman-Users maillist - Mailman-Users@python.org http://www.python.org/mailman/listinfo/mailman-users
--
George Dinwiddie gdinwiddie@min.net The gods do not deduct from man's allotted span those hours spent in sailing. NEW URL => http://www.Alberg30.org/
Erk. I think this is a Python bug; I think it should not treat '% d' the same as '%d'; but I'm having a hard time discovering anything formally specifying the format of a 'printf-like string interpolation function of the % operator' in the Python documentation; any help appreciated.
http://www.python.org/doc/current/lib/typesseq-strings.html
But I agree, this behavior surprised even me! But in fact, the documentation says the % operator mirrors C's printf formats and "% d" is a legal format (it means precede positive values with a blank).
So it's surprising, but intended behavior.
-Barry
At 1:42 PM -0500 10/30/00, Barry A. Warsaw wrote:
So it's surprising, but intended behavior.
it probably ought to be noted in the documentation somewhere, because otherwise, it'll drive the few who hit it crazy.
-- Chuq Von Rospach - Plaidworks Consulting (mailto:chuqui@plaidworks.com) Apple Mail List Gnome (mailto:chuq@apple.com)
Be just, and fear not.
"CVR" == Chuq Von Rospach chuqui@plaidworks.com writes:
>> So it's surprising, but intended behavior.
CVR> it probably ought to be noted in the documentation somewhere,
CVR> because otherwise, it'll drive the few who hit it crazy.
Good idea. I've added a link to Python's string formatting rules
http://www.python.org/doc/current/lib/typesseq-strings.html
to templates/headfoot.html so it'll show up in the details page for msg_footer, digest_footer, etc.
-Barry
The problem is that George's digest header had the string '% d' in it, and the 'string-mod' operation was trying to treat that as an integer format field. (the text was "10% discount").
Erk. I think this is a Python bug; I think it should not treat '% d' the same as '%d'; but I'm having a hard time discovering anything formally specifying the format of a 'printf-like string interpolation function of the % operator' in the Python documentation; any help appreciated.
I don't think it's a bug in Python but see also below.
It's a degenerate case of a "% 6d" form of specifier, in which the space indicates that the result is space filled and the 6 gives the field width. (a 0 indicates zero fill):
"10% 6discount" % 7 '10 7iscount' "10%06discount" % 18 '10000018iscount'
The above comes from Python 2.0 on Mac (for convenience)...results are the same in Python 1.5.2 on Red Hat Linux 6.2.
*Perhaps* it's a bug (or more likely mis-design) that the degenerate case is allowed, in that there will never be fill if there isn't a width stated.
And the %% solution is the correct one (in C and in Python).
Someone with better C skills than mine (which haven't been exercised in about 7 years) could try the samples in C (of various flavors).
--John
-- John Baxter jwblist@olympus.net Port Ludlow, WA, USA
"JWB" == John W Baxter jwblist@olympus.net writes:
JWB> Someone with better C skills than mine (which haven't been
JWB> exercised in about 7 years) could try the samples in C (of
JWB> various flavors).
-------------------- snip snip --------------------
#include
int main() { printf("% d\n", 10); return 0; } -------------------- snip snip -------------------- @anthem[[[/tmp:1037]]]% ./a.out 10 -------------------- snip snip --------------------
-Barry
participants (5)
-
barry@wooz.org
-
Chuq Von Rospach
-
Dan Mick
-
George Dinwiddie
-
John W Baxter