[Pkg-mailman-hackers] Bug#1000810: python3-django-hyperkitty: Internal Server Error (500): ImportError: cannot import name 'url_has_allowed_host_and_scheme'
Pierre-Elliott Bécue
peb at debian.org
Thu Dec 9 22:19:02 GMT 2021
Le lundi 29 novembre 2021 à 12:29:40+0000, Colin Turner a écrit :
> Package: python3-django-hyperkitty
> Version: 1.3.4-4
> Severity: normal
>
> Dear Maintainer,
>
> Thank you for work in packaging the mailman3 ecosystem.
>
> At some recent point, it became impossible to access the mailman 3 web interface, hyperkitty. An Internal Server Error is being reported on all attempts to access.
>
> The Traceback is a bit puzzling, since it looks like one part of Django is trying to import from another and finding a missing symbol name.
>
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/django/core/handlers/wsgi.py", line 141, in __call__
> ]
> File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 75, in get_response
> self._view_middleware.insert(
> File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 36, in inner
> async def inner(request):
> File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 90, in response_for_exception
> elif isinstance(exc, SuspiciousOperation):
> File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 128, in handle_uncaught_exception
>
> File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 597, in resolve_error_handler
> # urlconf_module might be a valid set of patterns, so we default to it
> File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 80, in __get__
> the lazy evaluation code is triggered. Results are not memoized; the
> File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 577, in urlconf_module
> sub_match_dict,
> File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
> File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 850, in exec_module
> File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
> File "/usr/share/mailman3-web/./urls.py", line 29, in <module>
> url(r'^postorius/', include('postorius.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.9/importlib/__init__.py", line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
> File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 850, in exec_module
> File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
> File "/usr/lib/python3/dist-packages/postorius/urls.py", line 23, in <module>
> from postorius.views import list as list_views
> File "/usr/lib/python3/dist-packages/postorius/views/list.py", line 48, in <module>
> from postorius.auth.mixins import ListOwnerMixin
> File "/usr/lib/python3/dist-packages/postorius/auth/mixins.py", line 21, in <module>
> from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
> File "/usr/lib/python3/dist-packages/django/contrib/auth/mixins.py", line 5, in <module>
> from django.contrib.auth.views import redirect_to_login
> File "/usr/lib/python3/dist-packages/django/contrib/auth/views.py", line 20, in <module>
> from django.utils.http import (
> ImportError: cannot import name 'url_has_allowed_host_and_scheme' from 'django.utils.http' (/usr/lib/python3/dist-packages/django/utils/http.py)
>
> The last files indicated are both in python3-django and it's not obvious to me why the import is failing or whether that's a red herring, but it seems as though this was linked to a recent python3-django upgrade?
>
> Happy to do any useful tests to investigate further.
>
> Kind regards,
Hi,
Thanks for your bug report!
Did the latest django release change anything?
--
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528 F493 0D44 2664 1949 74E2
It's far easier to fight for principles than to live up to them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-mailman-hackers/attachments/20211209/0a91ff6a/attachment.sig>
More information about the Pkg-mailman-hackers
mailing list