NAV 5.7.1 FreeBSD 12.4 Python 3.9
When visiting /alertprofiles/profile/ and choosing "Deactivate" on a profile we get an error. Since this is not something we do every day I'm not sure if this began after upgrading to 5.7.1 or if it has been broken for a while. During last upgrade I also upgraded python from 3.8 to 3.9 which could have introduced the error.
Internal Server Error: /alertprofiles/profile/remove/
RuntimeError at /alertprofiles/profile/remove/ dictionary keys changed during iteration
Request Method: POST Request URL: https://nav.uit.no/alertprofiles/profile/remove/ Django Version: 3.2.23 Python Executable: Python Version: 3.9.18 Python Path: ['/usr/local/lib/python39.zip', '/usr/local/lib/python3.9', '/usr/local/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/site-packages ', '/usr/local/lib/python3.9/site-packages', '/etc/nav/python'] Server time: Mon, 13 Nov 2023 09:25:39 +0100 Installed Applications: ('nav.models', 'nav.web', 'nav.django', 'django.contrib.staticfiles', 'django.contrib.sessions', 'django.contrib.humanize', 'django_filters', 'crispy_forms', 'crispy_forms_foundation', 'rest_framework', 'nav.auditlog', 'nav.web.macwatch', 'nav.web.geomap', 'nav.portadmin.napalm', 'nav.web.portadmin', 'django.contrib.postgres') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'nav.web.auth.AuthenticationMiddleware', 'nav.web.auth.AuthorizationMiddleware', 'nav.django.legacy.LegacyCleanupMiddleware', 'django.contrib.messages.middleware.MessageMiddleware')
Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.p y", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python3.9/site-packages/nav/web/alertprofiles/decorators .py", line 47, in _handler return func(request, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/nav/web/alertprofiles/views.py", line 316, in profile_remove for data in post:
Exception Type: RuntimeError at /alertprofiles/profile/remove/ Exception Value: dictionary keys changed during iteration Request information: USER: [unable to retrieve the current user]
GET: No GET data
POST: deactivate=1004 = 'Deactivate'
FILES: No FILES data
More logs avaliable.
--Ingeborg