[Pkg-mailman-hackers] Bug#962666: ModuleNotFoundError: No module named 'MySQLdb'
Olaf Zaplinski
olaf at zaplinski.de
Thu Jun 11 15:22:37 BST 2020
Package: mailman3-web
Version: 0+20180916-8
Severity: normal
Dear Maintainer,
on a fresh installed Debian host I have installed mariadb-server first and then mailman3-full.
Auto configuration of mailman3-web fails:
Creating config file /etc/mailman3/mailman-hyperkitty.cfg with new version
Setting up g++ (4:8.3.0-1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up python3-django-postorius (1.2.4-1) ...
Setting up python3-django-hyperkitty (1.2.2-1) ...
Setting up mailman3-web (0+20180916-8) ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/mailman3-web.conf
Creating config file /etc/dbconfig-common/mailman3-web.conf with new version
checking privileges on database mailman3web for mailman3web at localhost: user creation needed.
granting access to database mailman3web for mailman3web at localhost: success.
verifying access for mailman3web at localhost: success.
creating database mailman3web: already exists.
dbconfig-common: flushing administrative password
Creating config file /etc/mailman3/mailman-web.py with new version
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/mysql/base.py", line 26, in <module>
import MySQLdb as Database
ModuleNotFoundError: No module named 'MySQLdb'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/django-admin", line 21, in <module>
management.execute_from_command_line()
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/usr/lib/python3/dist-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 108, in populate
app_config.import_models()
File "/usr/lib/python3/dist-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/hyperkitty/models/__init__.py", line 25, in <module>
from .category import ThreadCategory
File "/usr/lib/python3/dist-packages/hyperkitty/models/category.py", line 61, in <module>
class ThreadCategory(models.Model):
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 124, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 325, in add_to_class
value.contribute_to_class(cls, name)
File "/usr/lib/python3/dist-packages/django/db/models/options.py", line 214, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/usr/lib/python3/dist-packages/django/db/__init__.py", line 33, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 211, in __getitem__
backend = load_backend(db['ENGINE'])
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 115, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/lib/python3/dist-packages/django/db/backends/mysql/base.py", line 30, in <module>
'Did you install mysqlclient or MySQL-python?' % e
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named 'MySQLdb'.
Did you install mysqlclient or MySQL-python?
dpkg: error processing package mailman3-web (--configure):
installed mailman3-web package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mailman3-full:
mailman3-full depends on mailman3-web (>= 0+20180916-1); however:
Package mailman3-web is not configured yet.
-- System Information:
Debian Release: 10.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-9-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mailman3-web depends on:
ii dbconfig-mysql 2.0.11+deb10u1
ii debconf [debconf-2.0] 1.5.71
ii lsb-base 10.2019051400
pn node-less <none>
ii python3 3.7.3-1
pn python3-django-hyperkitty <none>
pn python3-django-postorius <none>
pn python3-psycopg2 | python3-mysqldb <none>
pn python3-whoosh <none>
pn sassc <none>
ii ucf 3.0038+nmu1
pn uwsgi <none>
pn uwsgi-plugin-python3 <none>
Versions of packages mailman3-web recommends:
pn libapache2-mod-proxy-uwsgi | nginx <none>
Versions of packages mailman3-web suggests:
ii mariadb-server-10.3 [virtual-mysql-server] 1:10.3.22-0+deb10u1
More information about the Pkg-mailman-hackers
mailing list