No module named 'hyperkitty.urls' after upgrading python3
Ubuntu 20.04 python3 3.8.0-3 python3-django-hyperkitty: 1.3.2
Traceback (most recent call last):
File "/usr/share/mailman3-web/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 361, in execute
self.check()
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 387, in check
all_issues = self._run_checks(
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 377, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/lib/python3/dist-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line 23, in check_resolver
return check_method()
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 399, in check
for pattern in self.url_patterns:
File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 584, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 577, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/etc/mailman3/django/urls.py", line 30, in <module>
url(r'^hyperkitty/', include('hyperkitty.urls')),
File "/usr/lib/python3/dist-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'hyperkitty.urls'
# dpkg --contents python3-django-hyperkitty_1.3.2+b1-20.04_amd64.deb|grep urls
-rw-r--r-- root/staff 1356 2020-01-14 12:22 ./usr/local/lib/python3.7/dist-packages/HyperKitty-1.3.2-py3.7.egg/example_project/urls.py
-rw-r--r-- root/staff 1043 2020-01-14 12:22 ./usr/local/lib/python3.7/dist-packages/HyperKitty-1.3.2-py3.7.egg/hyperkitty/tests/urls_test.py
-rw-r--r-- root/staff 7783 2020-01-14 12:22 ./usr/local/lib/python3.7/dist-packages/HyperKitty-1.3.2-py3.7.egg/hyperkitty/urls.py
-rw-r--r-- root/root 1356 2019-09-01 02:56 ./usr/share/doc/python3-django-hyperkitty/examples/urls.py
No such issue with python3 3.7.5-3. Any suggestion?
The previous error messages are generated by the following cron job:
* * * * * www-data [ -f /usr/bin/django-admin ] && flock -n /var/run/mailman3-web/cron.minutely /usr/share/mailman3-web/manage.py runjobs minutely
I have just realized what is happening: the package has been built with python3.7, not python3.8.
Yes. Rebuilding python3-django-hyperkitty with python3.8 solves this issue. If anyone is interested, it is available at https://git.sdxlive.com/PPA/tree/Ubuntu/pool/stable/p/python3-django-hyperki... (1.3.2+b2).
On Fri, Feb 14, 2020, at 2:15 AM, jean-christophe manciot wrote:
Yes. Rebuilding python3-django-hyperkitty with python3.8 solves this issue. If anyone is interested, it is available at https://git.sdxlive.com/PPA/tree/Ubuntu/pool/stable/p/python3-django-hyperki... (1.3.2+b2).
A word of caution that Hyperkitty has bugs with Python 3.8.0, which were fixed in the subsequent Python 3.8.1 release. Please make sure you are using the appropriate version of Python.
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
Thanks for the heads-up. But the version of python3 which appears on my first post is misleading: it actually matches python3-minimal containing /usr/bin/python3 which is a symlink to python3.8. The latter is included in the following package:
python3.8-minimal:
Installed: 3.8.2~rc1-1ubuntu1
Candidate: 3.8.2~rc1-1ubuntu1
Version table:
*** 3.8.2~rc1-1ubuntu1 500
500 http://fr.archive.ubuntu.com/ubuntu focal/main amd64 Packages
100 /var/lib/dpkg/status
3.8.1-2+b1+20.04 500
500 https://git.sdxlive.com/PPA/plain/Ubuntu focal/stable amd64 Packages
3.8.1-2+20.04 500
500 https://git.sdxlive.com/PPA/plain/Ubuntu focal/stable amd64 Packages
3.8.1-1+20.04 500
500 https://git.sdxlive.com/PPA/plain/Ubuntu focal/stable amd64 Packages
3.8.0-4+20.04 500
500 https://git.sdxlive.com/PPA/plain/Ubuntu focal/stable amd64 Packages
participants (3)
-
Abhilash Raj
-
Bjoern Franke
-
jean-christophe manciot