AttributeError at /about/: 'AnonymousUser' object has no attribute 'person'
Internal Server Error: /about/
AttributeError at /about/
'AnonymousUser' object has no attribute 'person'
Request Method: HEAD
Request URL: [1] https://info.katharineum.de/about/
Django Version: 3.2.11
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.9.2
Python Path: ['/srv/aleksis', '.', '', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/srv/aleksis/envs/production/lib/python3.9/site-packages']
Server time: Sun, 27 Mar 2022 11:41:30 +0200
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django_uwsgi',
'django_extensions',
'guardian',
'rules.apps.AutodiscoverRulesConfig',
'haystack',
'polymorphic',
'dj_cleavejs.apps.DjCleaveJSConfig',
'dbbackup',
'django_celery_beat',
'django_celery_results',
'celery_progress',
'health_check.contrib.celery',
'djcelery_email',
'celery_haystack',
'sass_processor',
'django_any_js',
'django_yarnpkg',
'django_tables2',
'maintenance_mode',
'menu_generator',
'reversion',
'phonenumber_field',
'debug_toolbar',
'django_prometheus',
'django_select2',
'templated_email',
'html2text',
'django_otp.plugins.otp_totp',
'django_otp.plugins.otp_static',
'django_otp',
'otp_yubikey',
'aleksis.core',
'allauth',
'allauth.account',
'allauth.socialaccount',
'invitations',
'health_check',
'health_check.db',
'health_check.cache',
'health_check.storage',
'health_check.contrib.psutil',
'health_check.contrib.migrations',
'dynamic_preferences',
'dynamic_preferences.users.apps.UserPreferencesConfig',
'impersonate',
'two_factor',
'material',
'ckeditor',
'ckeditor_uploader',
'django_js_reverse',
'colorfield',
'django_bleach',
'favicon',
'django_filters',
'oauth2_provider',
'rest_framework',
'dj_iconify.apps.DjIconifyConfig',
'extra_views',
'feeds',
'aleksis.apps.chronos.apps.ChronosConfig',
'aleksis.apps.hjelp.apps.HjelpConfig',
'aleksis.apps.abi.apps.DefaultConfig',
'aleksis.apps.csv_import.apps.CSVImportConfig',
'aleksis.apps.untis.apps.UntisConfig',
'aleksis.apps.donations.apps.DonationsConfig',
'aleksis.apps.fritak.apps.FritakConfig',
'aleksis.apps.ldap.apps.LDAPConfig',
'aleksis.apps.order.apps.DefaultConfig',
'aleksis.apps.matrix.apps.DefaultConfig',
'aleksis.apps.evalu.apps.DefaultConfig',
'aleksis.apps.dashboardfeeds.apps.DefaultConfig',
'aleksis.apps.resint.apps.ResintConfig',
'aleksis.apps.alsijil.apps.AlsijilConfig',
'cachalot',
'django_cleanup.apps.CleanupConfig']
Installed Middleware:
['django_prometheus.middleware.PrometheusBeforeMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
'django.contrib.sites.middleware.CurrentSiteMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django_otp.middleware.OTPMiddleware',
'impersonate.middleware.ImpersonateMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'maintenance_mode.middleware.MaintenanceModeMiddleware',
'aleksis.core.util.middlewares.EnsurePersonMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware']
Traceback (most recent call last):
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/aleksis/core/views.py", line 268, in about
return render(request, "core/pages/about.html", context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/sentry_sdk/integrations/django/templates.py", line 95, in render
return real_render(request, template_name, context, *args, **kwargs)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/shortcuts.py", line 19, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 170, in render
return self._render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
return self.nodelist.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
return self.nodelist.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/defaulttags.py", line 312, in render
return nodelist.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/loader_tags.py", line 195, in render
return template.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 172, in render
return self._render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
return self.nodelist.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/defaulttags.py", line 211, in render
nodelist.append(node.render_annotated(context))
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/defaulttags.py", line 312, in render
return nodelist.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/template/library.py", line 192, in render
output = self.func(*resolved_args, **resolved_kwargs)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/aleksis/core/templatetags/data_helpers.py", line 62, in build_badge
return badge(request)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/aleksis/core/util/core_helpers.py", line 326, in unread_notifications_badge
return request.user.person.unread_notifications_count
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/utils/functional.py", line 247, in inner
return func(self._wrapped, *args)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/utils/functional.py", line 247, in inner
return func(self._wrapped, *args)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/utils/functional.py", line 247, in inner
return func(self._wrapped, *args)
Exception Type: AttributeError at /about/
Exception Value: 'AnonymousUser' object has no attribute 'person'
Request information:
USER: AnonymousUser
GET: No GET data
POST: No POST data
FILES: No FILES data
COOKIES: No cookie data
Edited by Jonathan Weth