[Mailman-Users] Re: dnspython error

2020-07-31 Thread csa--- via Mailman-Users
Thank you for the prompt assistance.

Below are the results

>>> import dns.resolver
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named dns.resolver
>>> import sys
>>> sys.path
['', '/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/site-packages']
>>>
root@granular:~/mailman-2.1.34# which -a python
/usr/local/bin/python
/usr/bin/python
root@granular:~/mailman-2.1.34#



-Original Message-
From: Mark Sapiro  
Sent: Thursday, July 30, 2020 8:05 PM
To: mailman-users@python.org
Subject: [Mailman-Users] Re: dnspython error

On 7/30/20 6:11 PM, csa--- via Mailman-Users wrote:
> I'm updating Mailman from 2.1.19 to 2.1.34 from source. When I run 
> configure
> 
> 
>   ./configure --prefix=/var/lib/mailman --with-username=list 
> --with-groupname=list --with-cgi-gid=www-data --with-mail-gid=list
> 
> I get an error that dnspython is not installed
> 
>   checking dnspython... configure: error:
> 
> when I then try and install dnspycthon using pip, I get
> 
>   Requirement already satisfied: dnspython in 
> /usr/lib/python2.7/dist-packages
What happens if you invoke Python and type

import dns.resolver

does that succeed or give ImportError

That's what configure is doing to determine if you have dnspython installed.
If you get an ImportError with the manual import, pip must be looking
somewhere that isn't in your path. I don't spicifically know what the issue
is, but if in Python you type

import sys
sys.path

is '/usr/lib/python2.7/dist-packages' one of the paths listed? It it is and
you can't import dns.resolver, there's something amiss with its
installation. You could try

sudo pip uninstall dnspython
sudo pip install dnspython

and see if that helps.

Otherwise, you may have more than one Python and dnspython is not installed
in the default one. What does

which -a python

show?

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send
an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy:
http://wiki.list.org/x/QIA9 Searchable Archives:
https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: dnspython error

2020-07-31 Thread Mark Sapiro
On 7/31/20 8:15 AM, csa--- via Mailman-Users wrote:
> Thank you for the prompt assistance.
> 
> Below are the results
> 
 import dns.resolver
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named dns.resolver
 import sys
 sys.path
> ['', '/usr/local/lib/python2.7',
> '/usr/local/lib/python2.7/plat-x86_64-linux-gnu',
> '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
> '/usr/local/lib/python2.7/lib-dynload',
> '/usr/local/lib/python2.7/site-packages']

> root@granular:~/mailman-2.1.34# which -a python
> /usr/local/bin/python
> /usr/bin/python
> root@granular:~/mailman-2.1.34#


You have two python installations, one in  /usr/local/bin/python with
libraries in /usr/local/lib/python2.7 and one in /usr/bin/python with
libraries in /usr/lib/python2.7.

dnspython is installed in /usr/lib/python2.7, but the python run with
the `python` command is using /usr/local/lib/python2.7.

Your choices are to install dnspython in /usr/local/lib/python2.7 which
you can do by

sudo cp -a /usr/lib/python2.7/dist-packages/dns \
/usr/lib/python2.7/dist-packages/

or you can run mailman's configure with the option

--with-python /usr/bin/python

First, I would run both

/usr/bin/python --version
/usr/local/bin/python --version

to see which is newer and use the newer one.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: dnspython error

2020-07-31 Thread csa--- via Mailman-Users
Okay, that worked. I ran configure, make and make install without errors.
Now however when I try and access any list's admin web page I get a 'Bug in
Mailman version 2.1.34. We're sorry, we hit a bug!'  The web server log
shows the error below, which I can't get past.


[- Mailman Version: 2.1.34 -]
[- Traceback --]
Traceback (most recent call last):
  File "/var/lib/mailman/scripts/driver", line 85, in run_main
immediate=1)
  File "/var/lib/mailman/Mailman/Logging/StampedLogger.py", line 52, in
__init__
Logger.__init__(self, category, nofail, immediate)
  File "/var/lib/mailman/Mailman/Logging/Logger.py", line 50, in __init__
self.__get_f()
  File "/var/lib/mailman/Mailman/Logging/Logger.py", line 68, in __get_f
1)
  File "/usr/local/lib/python2.7/codecs.py", line 898, in open
file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: '/var/lib/mailman/logs/error'
[- Python Information -]
sys.version = 2.7.15 (default, Jul 30 2020, 16:33:10)
[GCC 5.4.0 20160609]
sys.executable  = /usr/local/bin/python
sys.prefix  = /usr/local
sys.exec_prefix = /usr/local
sys.path= ['/var/lib/mailman/pythonlib', '/var/lib/mailman',
'/usr/lib/mailman/scripts', '/usr/local/lib/python27.zip',
'/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2',
'/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/dist-packages',
'/usr/local/lib/python2.7/site-packages', '/usr/local/lib/site-python']
sys.platform= linux2
[- Environment Variables -]
HTTP_COOKIE:
ssan+admin=28020069fb5b235f73280064633765383665623437343363633133396
23035346635623736393239323266336539366137
SERVER_NAME: lists.naturalintelligence.us
REMOTE_ADDR: 157.131.253.99
PYTHONPATH: /var/lib/mailman
REMOTE_PORT: 56557
REQUEST_SCHEME: http
SCRIPT_NAME: /cgi-bin/mailman/admin
REQUEST_METHOD: GET
HTTP_HOST: lists.naturalintelligence.us
PATH_INFO: /ssan/contentfilter
SERVER_PORT: 80
SERVER_PROTOCOL: HTTP/1.1
QUERY_STRING:
REQUEST_URI: /cgi-bin/mailman/admin/ssan/contentfilter
DOCUMENT_ROOT: /var/www/html


-Original Message-
From: Mark Sapiro  
Sent: Friday, July 31, 2020 10:11 AM
To: mailman-users@python.org
Subject: [Mailman-Users] Re: dnspython error

On 7/31/20 8:15 AM, csa--- via Mailman-Users wrote:
> Thank you for the prompt assistance.
> 
> Below are the results
> 
 import dns.resolver
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named dns.resolver
 import sys
 sys.path
> ['', '/usr/local/lib/python2.7',
> '/usr/local/lib/python2.7/plat-x86_64-linux-gnu',
> '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
> '/usr/local/lib/python2.7/lib-dynload',
> '/usr/local/lib/python2.7/site-packages']

> root@granular:~/mailman-2.1.34# which -a python /usr/local/bin/python 
> /usr/bin/python root@granular:~/mailman-2.1.34#


You have two python installations, one in  /usr/local/bin/python with
libraries in /usr/local/lib/python2.7 and one in /usr/bin/python with
libraries in /usr/lib/python2.7.

dnspython is installed in /usr/lib/python2.7, but the python run with the
`python` command is using /usr/local/lib/python2.7.

Your choices are to install dnspython in /usr/local/lib/python2.7 which you
can do by

sudo cp -a /usr/lib/python2.7/dist-packages/dns \
/usr/lib/python2.7/dist-packages/

or you can run mailman's configure with the option

--with-python /usr/bin/python

First, I would run both

/usr/bin/python --version
/usr/local/bin/python --version

to see which is newer and use the newer one.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send
an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy:
http://wiki.list.org/x/QIA9 Searchable Archives:
https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: dnspython error

2020-07-31 Thread Mark Sapiro
On 7/31/20 11:48 AM, c...@web-analysts.net wrote:
> Okay, that worked. I ran configure, make and make install without errors.
> Now however when I try and access any list's admin web page I get a 'Bug in
> Mailman version 2.1.34. We're sorry, we hit a bug!'  The web server log
> shows the error below, which I can't get past.
> 
> 
> [- Mailman Version: 2.1.34 -]
> [- Traceback --]
...
> IOError: [Errno 13] Permission denied: '/var/lib/mailman/logs/error'


Run Mailman's `bin/checkperms -f` as root.

Or, see  and the check.py script
linked therefrom.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/