Upgrade install - "Could not import paths!"

I had MM 2.0.x, upgrading to MM 2.1.2 by installing over - not moving lists about. I used --prefix=/home/mailman. I can see a couple of errors reported and when I do a bin/check_perms i get..
[admin@xyz mailman-2.1.2]$ cd /home/mailman [admin@xyz mailman]$ bin/check_perms Could not import paths!
This probably means that you are trying to run check_perms from the source directory. You must run this from the installation directory instead.
Traceback (most recent call last): File "bin/check_perms", line 38, in ? import paths File "bin/paths.py", line 59, in ? import korean ImportError: No module named korean
As I understand I need to be in $prefix to run check_perms and that's / home/mailman so the warning is either wrong or something else... ;-)
Cron daemon is also sending the following every five minutes
Traceback (most recent call last): File "/home/mailman/cron/gate_news", line 38, in ? import paths File "/home/mailman/cron/paths.py", line 59, in ? import korean ImportError: No module named korean
Same/different trouble?
Thanks for help!
david.gordon

On Saturday, August 2, 2003, at 05:13 pm, david.gordon wrote:
I had MM 2.0.x, upgrading to MM 2.1.2 by installing over - not moving lists about. I used --prefix=/home/mailman. I can see a couple of errors reported and when I do a bin/check_perms i get..
[admin@xyz mailman-2.1.2]$ cd /home/mailman [admin@xyz mailman]$ bin/check_perms Could not import paths!
This probably means that you are trying to run check_perms from the source directory. You must run this from the installation directory instead.
Traceback (most recent call last): File "bin/check_perms", line 38, in ? import paths File "bin/paths.py", line 59, in ? import korean ImportError: No module named korean
As I understand I need to be in $prefix to run check_perms and that's / home/mailman so the warning is either wrong or something else... ;-)
Cron daemon is also sending the following every five minutes
Traceback (most recent call last): File "/home/mailman/cron/gate_news", line 38, in ? import paths File "/home/mailman/cron/paths.py", line 59, in ? import korean ImportError: No module named korean
Same/different trouble?
You should have two files in you Mailman runtime installation:
$prefix/pythonlib/korean $prefix/pythonlib/korean.pth
and I would also expect the following files in your Mailman build directory after having run ./configure and make install:
$build/misc/KoreanCodecs-2.0.5/korean $build/misc/KoreanCodecs-2.0.5/build/lib.linux-i686-2.2/korean
If these files are not present then you should consider re-running ./configure and make and looking for any errors in the output.
If the files are present then something may be wrong in the paths module. There are multiple copies of this file (all the same) under Mailman's $prefix directory:
./bin/paths.py ./scripts/paths.py ./cron/paths.py ./tests/paths.py
If everything is installed OK then you should be able to do the following from the command line in the $prefix/bin directory:
mailman@mailman2:/mailman/run/bin> python Python 2.2.2 (#3, Feb 11 2003, 16:57:53) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sys sys.path ['', '/usr/local/lib/python2.2', '/usr/local/lib/python2.2/plat-linux2', '/usr/local/lib/python2.2/lib-tk', '/usr/local/lib/python2.2/lib-dynload', '/usr/local/lib/python2.2/site-packages'] import paths sys.path ['/mailman/run/pythonlib', '/mailman/run', '', '/usr/local/lib/python2.2', '/usr/local/lib/python2.2/plat-linux2', '/usr/local/lib/python2.2/lib-tk', '/usr/local/lib/python2.2/lib-dynload', '/usr/local/lib/python2.2/site-packages', '/usr/local/lib/python2.2/site-packages'] dir(paths) ['__builtins__', '__doc__', '__file__', '__name__', 'exec_prefix', 'japanese', 'korean', 'os', 'prefix', 'sitedir', 'sys'] paths.korean <module 'korean' from '/mailman/run/pythonlib/korean/__init__.pyc'> import korean sys.exit() mailman@mailman2:/mailman/run/bin>
If you still have problems, what version of which OS are you running and which version of Python. And what happens when you try the above stuff from the command line.
Thanks for help!
david.gordon
Richard Barrett http://www.openinfo.co.uk

On Saturday, August 2, 2003, at 05:13 pm, david.gordon wrote:
I had MM 2.0.x, upgrading to MM 2.1.2 by installing over - not moving lists about. I used --prefix=/home/mailman. I can see a couple of errors reported and when I do a bin/check_perms i get..
[admin@xyz mailman-2.1.2]$ cd /home/mailman [admin@xyz mailman]$ bin/check_perms Could not import paths!
This probably means that you are trying to run check_perms from the source directory. You must run this from the installation directory instead.
Traceback (most recent call last): File "bin/check_perms", line 38, in ? import paths File "bin/paths.py", line 59, in ? import korean ImportError: No module named korean
As I understand I need to be in $prefix to run check_perms and that's / home/mailman so the warning is either wrong or something else... ;-)
Cron daemon is also sending the following every five minutes
Traceback (most recent call last): File "/home/mailman/cron/gate_news", line 38, in ? import paths File "/home/mailman/cron/paths.py", line 59, in ? import korean ImportError: No module named korean
Same/different trouble?
You should have two files in you Mailman runtime installation:
$prefix/pythonlib/korean $prefix/pythonlib/korean.pth
and I would also expect the following files in your Mailman build directory after having run ./configure and make install:
$build/misc/KoreanCodecs-2.0.5/korean $build/misc/KoreanCodecs-2.0.5/build/lib.linux-i686-2.2/korean
If these files are not present then you should consider re-running ./configure and make and looking for any errors in the output.
If the files are present then something may be wrong in the paths module. There are multiple copies of this file (all the same) under Mailman's $prefix directory:
./bin/paths.py ./scripts/paths.py ./cron/paths.py ./tests/paths.py
If everything is installed OK then you should be able to do the following from the command line in the $prefix/bin directory:
mailman@mailman2:/mailman/run/bin> python Python 2.2.2 (#3, Feb 11 2003, 16:57:53) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sys sys.path ['', '/usr/local/lib/python2.2', '/usr/local/lib/python2.2/plat-linux2', '/usr/local/lib/python2.2/lib-tk', '/usr/local/lib/python2.2/lib-dynload', '/usr/local/lib/python2.2/site-packages'] import paths sys.path ['/mailman/run/pythonlib', '/mailman/run', '', '/usr/local/lib/python2.2', '/usr/local/lib/python2.2/plat-linux2', '/usr/local/lib/python2.2/lib-tk', '/usr/local/lib/python2.2/lib-dynload', '/usr/local/lib/python2.2/site-packages', '/usr/local/lib/python2.2/site-packages'] dir(paths) ['__builtins__', '__doc__', '__file__', '__name__', 'exec_prefix', 'japanese', 'korean', 'os', 'prefix', 'sitedir', 'sys'] paths.korean <module 'korean' from '/mailman/run/pythonlib/korean/__init__.pyc'> import korean sys.exit() mailman@mailman2:/mailman/run/bin>
If you still have problems, what version of which OS are you running and which version of Python. And what happens when you try the above stuff from the command line.
Thanks for help!
david.gordon

Richard Barrett wrote on Sun 3 Aug 2003 at 16:14 +0100
You should have two files in you Mailman runtime installation:
$prefix/pythonlib/korean $prefix/pythonlib/korean.pth
Apologies, I don't do this often enough to know what I (er, or you) am on about. Where exactly these files are eludes me. I'm willing to admit my ignorance if people here are willing to help me learn! ;-)
and I would also expect the following files in your Mailman build directory after having run ./configure and make install:
The "build directory" being...
Anyway, no matter. I've reinstalled and somehow solved the problem. I think I used --with-mail-gid=admin & --with-cgi-gid=admin (plus -- prefix=/home/mailman)
However.... I now have an "Internal Server Error" when trying to get to the admin pages via the web. I remember reading about this when I first installed Mailman. I know its a cgi permissions problem but I cant remember how to fix it. I've read the docs. I've tried reinstalling using --with-cgi-gid=web as that's what my httpd.conf says. Didn't work though. My httpd error_log says
[Mon Aug 4 11:52:01 2003] [error] [client x.x.x.x] Premature end of script headers: /home/mailman/cgi-bin/private
My VirtualHost for this domain is set up and was working with Mailman 2.0.x.
Thanks again.
-- david.gordon

On Monday, August 4, 2003, at 12:08 pm, david.gordon wrote:
Richard Barrett wrote on Sun 3 Aug 2003 at 16:14 +0100
You should have two files in you Mailman runtime installation:
$prefix/pythonlib/korean $prefix/pythonlib/korean.pth
Apologies, I don't do this often enough to know what I (er, or you) am on about.
$prefix means the path of the directory in which you installed Mailman into, default /usr/local/mailman, unless you changed it by adding the --prefix= option when you ran .configure. That is why the documentation files such as Mailman's INSTALL also use this way of referring to the site specific installation directory
Similarly, by $build I mean the path of the directory in which you ran ./configure and make install to install Mailman.
I am suggesting you check for the presence of certain files related to the problem you report in the Mailman build and installation directory.
Where exactly these files are eludes me. I'm willing to admit my ignorance if people here are willing to help me learn! ;-)
and I would also expect the following files in your Mailman build directory after having run ./configure and make install:
The "build directory" being...
Anyway, no matter. I've reinstalled and somehow solved the problem. I think I used --with-mail-gid=admin & --with-cgi-gid=admin (plus -- prefix=/home/mailman)
However.... I now have an "Internal Server Error" when trying to get to the admin pages via the web. I remember reading about this when I first installed Mailman. I know its a cgi permissions problem but I cant remember how to fix it. I've read the docs. I've tried reinstalling using --with-cgi-gid=web as that's what my httpd.conf says. Didn't work though. My httpd error_log says
[Mon Aug 4 11:52:01 2003] [error] [client x.x.x.x] Premature end of script headers: /home/mailman/cgi-bin/private
I think that every (although I am open to correction) Mailman script that is run will execute and 'import paths' statement which in turn will execute an 'import korean'. The problem with these import statemeets is what you reported in your original post and which I was trying to help you diagnose.
Unless you previously reported problem has been fully corrected then this may be the latest manifestation of a failing import statement.
Dose anything show in the Mailman's error log $prefix/logs/error?
My VirtualHost for this domain is set up and was working with Mailman 2.0.x.
Yes but you have now upgraded you installation to MM 2.1.2 and it appears that something went wrong when you originally dir so; which is why you were getting these. Once these new problems are corrected then you virtual hosts should probably work OK.
I refer you back to the exercise, from my previous response, in running Python from the command line and typing in some statement to see if they work as a way of trying to confirm/diagnose the precise nature of your installation's problem.
Thanks again.
-- david.gordon

Richard Barrett wrote on Mon 4 Aug 2003 at 14:37 +0100
$prefix means the path of the directory in which you installed Mailman
Yes! I did install --prefix=/home/mailman BTW
Unless you previously reported problem has been fully corrected then this may be the latest manifestation of a failing import statement.
I can now see the files you referred to
drwxrwsr-x 5 mailman mailman 4096 Aug 3 18:57 korean -rw-rw-r-- 1 mailman mailman 22 Aug 3 20:26 korean.pth
and I think that problem has gone away. I'm certainly not getting mail alerts from Mailer Daemon every five minutes now.
Dose anything show in the Mailman's error log $prefix/logs/error?
Aug 03 18:57:45 2003 (4522) couldn't load config file /home/mailman/ lists/test/config.pck.last [Errno 2] No such file or directory: '/home/mailman/lists/test/ config.pck.last' Aug 03 18:57:45 2003 (4522) couldn't load config file /home/mailman/ lists/test/config.pck [Errno 2] No such file or directory: '/home/mailman/lists/test/config.pck' Aug 03 18:57:45 2003 (4522) couldn't load config file /home/mailman/ lists/test/config.pck.last [Errno 2] No such file or directory: '/home/mailman/lists/test/ config.pck.last' Aug 03 18:57:46 2003 (4522) couldn't load config file /home/mailman/ lists/test/config.pck [Errno 2] No such file or directory: '/home/mailman/lists/test/config.pck' Aug 03 18:57:46 2003 (4522) couldn't load config file /home/mailman/ lists/test/config.pck.last [Errno 2] No such file or directory: '/home/mailman/lists/test/ config.pck.last'
If everything is installed OK then you should be able to do the following from the command line in the $prefix/bin directory:
Here's the result - but as I say I think this problem is already fixed
import sys sys.path ['', '/usr/lib/python2.2', '/usr/lib/python2.2/plat-linux2', '/usr/lib/
import paths sys.path ['/home/mailman/pythonlib', '/home/mailman', '', '/usr/lib/python2.2', '/ usr/lib/python2.2/plat-linux2', '/usr/lib/python2.2/lib-tk', '/usr/lib/
[admin@dg3 bin]$ python Python 2.2.2 (#1, May 28 2003, 11:39:00) [GCC 3.2.2 20030217 (Red Hat Linux 8.0 3.2.2-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. python2.2/lib-tk', '/usr/lib/python2.2/lib-dynload', '/usr/lib/python2.2/ site-packages'] python2.2/lib-dynload', '/usr/lib/python2.2/site-packages', '/usr/lib/ python2.2/site-packages']
dir(paths) ['__builtins__', '__doc__', '__file__', '__name__', 'exec_prefix', 'japanese', 'korean', 'os', 'prefix', 'sitedir', 'sys'] paths.korean <module 'korean' from '/home/mailman/pythonlib/korean/__init__.pyc'> import korean sys.exit() [admin@dg3 bin]$
From what I have read of the docs its my path to perl thats causing the Internal Server Error when I try to access the admin page by web. My httpd error_log says
[Mon Aug 4 11:52:01 2003] [error] [client x.x.x.x] Premature end of script headers: /home/mailman/cgi-bin/private
david.gordon
participants (3)
-
david.gordon
-
Richard Barrett
-
Richard Barrett