[Mailman-Users] Solve: pcre traceback (was: Help)
Aly S.P Dharshi
aly.dharshi at uleth.ca
Fri Aug 17 23:12:11 CEST 2001
Hi All, Greg,
On 17 Aug 2001, at 16:52, Greg Ward wrote:
> OK, but you haven't told us what Python version. I suspect that's
> important here!
>
Yes, I am sorry that I neglected to provide this information, it
is/was RedHat stock python 1.5.2
> Also, as an aside, subject lines like "Help" are pretty useless. I
> often delete such messages without bothering to read them, and I'm sure
> lots of other people do.
>
Sorry, I will provide more useful subject lines.
> > Traceback (innermost last):
> > File "/home/mailman/cron/qrunner", line 85, in ?
> > from Mailman import MailList
> > File "/home/mailman/Mailman/MailList.py", line 45, in ?
> > from Mailman.Archiver import Archiver
> > File "/home/mailman/Mailman/Archiver/__init__.py", line 17, in ?
> > from Archiver import *
> > File "/home/mailman/Mailman/Archiver/Archiver.py", line 33, in ?
> > from Mailman import Mailbox
> > File "/home/mailman/Mailman/Mailbox.py", line 27, in ?
> > class Mailbox(mailbox.UnixMailbox):
> > File "/home/mailman/Mailman/Mailbox.py", line 31, in Mailbox
> > _regexp = re.compile(_fromlinepattern)
> > File "/usr/lib/python1.5/re.py", line 79, in compile
> > code=pcre_compile(pattern, flags, groupindex)
> > pcre.error: ('nothing to repeat', 36)
>
> Let's see if we can reproduce this error outside of Mailman. Fire up a
> Python interpreter:
>
> $ python
>
> and at the ">>>" prompt enter:
>
> import re
> p = r'From \s*\S+\s+\w\w\w\s+\w\w\w\s+\d\d?\s+' \
> r'\d\d?:\d\d(:\d\d)?(\s+\S+)?\s+\d\d\d\d\s*$'
> re.compile(p)
>
> For Python 1.5.2 or 1.6, Python should see print something like this:
>
> <re.RegexObject instance at 8082a30>
>
> For Python 2.0 and later, it should print something like this:
>
> <SRE_Pattern object at 0x8136c00>
>
> If you get one of those, you may have found a Mailman bug. If instead
> you get stack dump, you *might* have found a Python bug, but it's more
> likely that there's something wrong with your Python installation.
I downloaded python 2.2 from ftp.python.org and yahoo!!! it seems to
work again. I have no idea why it broke before.
Some tests you asked me to perform:
[sysadmin at hermes /home/sysadmin]$ python1.5
Python 1.5.2 (#1, Mar 3 2001, 01:35:43) [GCC 2.96 20000731 (Red Hat
Linux 7.1 2 on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import re
>>> p = r'From \s*\S+\s+\w\w\w\s+\w\w\w\s+\d\d?\s+' \
... r'\d\d?:\d\d(:\d\d)?(\s+\S+)?\s+\d\d\d\d\s*$'
>>> re.compile(p)
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/lib/python1.5/re.py", line 79, in compile
code=pcre_compile(pattern, flags, groupindex)
pcre.error: ('nothing to repeat', 36)
>>>
On Python V 2.2 a:
[sysadmin at hermes /home/sysadmin]$ python
Python 2.2a1 (#1, Jul 26 2001, 05:00:49)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-81)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import re
>>> p = r'From \s*\S+\s+\w\w\w\s+\w\w\w\s+\d\d?\s+' \
... r'\d\d?:\d\d(:\d\d)?(\s+\S+)?\s+\d\d\d\d\s*$'
>>> re.compile(p)
<SRE_Pattern object at 0x8165a60>
>>>
But it is now working, thanks for your help.
Cheers,
Aly.
More information about the Mailman-Users
mailing list