[Mailman-Users] 'import site' vs. qrunner
chil at titan.kyndig.com
chil at titan.kyndig.com
Sat Sep 28 00:01:26 CEST 2002
Greetings,
I've had some waves pop up during my installation of mailman, concerning
the invocation of python with -S when calling qrunner. Here's the main
info concerning the problem:
OS: RedHat 7.2 i386
Python: python2-2.1.1-2
Mailman: mailman 2.0.13 (installed from source)
I installed mailman following instructions in INSTALL, and set up a test
list (devel-news) for which everything seems to work except for archiving.
Messages get added to archives/private/devel-news.mbox/devel-news.mbox
just fine, but the pipermail archives (archives/private/devel-news/) are
ignored altogether, with nothing being generated.
Checking logs/error, I see this:
Sep 27 17:05:01 2002 qrunner(1912): Traceback (most recent call last):
Sep 27 17:05:01 2002 qrunner(1912): File "/usr/local/mailman/Mailman/Archiver/Archiver.py", line 219, in ArchiveMail
Sep 27 17:05:01 2002 qrunner(1912): import HyperArch
Sep 27 17:05:01 2002 qrunner(1912): File "/usr/local/mailman/Mailman/Archiver/HyperArch.py", line 47, in ?
Sep 27 17:05:01 2002 qrunner(1912): from Mailman import EncWord
Sep 27 17:05:01 2002 qrunner(1912): File "/usr/local/mailman/Mailman/EncWord.py", line 21, in ?
Sep 27 17:05:01 2002 qrunner(1912): import base64
Sep 27 17:05:01 2002 qrunner(1912): File "/tmp/32444-i386/install/usr/lib/python2.1/base64.py", line 7, in ?
Sep 27 17:05:01 2002 qrunner(1912): import binascii
Sep 27 17:05:01 2002 qrunner(1912): ImportError: No module named binascii
Sep 27 17:05:01 2002 (1912) CORRUPT ARCHIVE FOR LIST: devel-news
However, binascii is available in the python lib directory, under the site
packages:
[root at devel /]# ls -l /usr/lib/python2.1/site-packages/binascii*
-rwxr-xr-x 1 root root 57103 Aug 13 2001 /usr/lib/python2.1/site-packages/binascii.so
After poking about, I noticed that qrunner is called with python -S
(don't imply 'import site' on initialization, according to the manpages)
from the default crontab.in:
* * * * * /usr/bin/python -S /usr/local/mailman/cron/qrunner
Removing the -S allowed the binascii module to be found, and now mail is
archived happily with no problems. Is there any particular reason why site
packages were disabled? Is this change "safe"?
--
Bobby Bailey | "The only source of knowledge is experience."
MUD Developer | -- Albert Einstein
Internet Junkie | PGP Keys: http://chil.kyndig.com/pgp
http://www.kyndig.com/ -- Mud & Online Text Game Community
More information about the Mailman-Users
mailing list