Internal Server Error: /mailman3/hyperkitty/api/mailman/archive
Hello everyone. I am trying to sort out an error happening when messages are sent to the mailman server. The emails are being sent to the list but I get this error each time:
Internal Server Error: /mailman3/hyperkitty/api/mailman/archive
OperationalError at /hyperkitty/api/mailman/archive (1366, "Incorrect string value: '\\xF0\\x9F\\x90\\xBA\\x0A\\x0A...' for column 'content' at row 1")
Request Method: POST Request URL: http://localhost/mailman3/hyperkitty/api/mailman/archive?key=7OF5IogiQItSUKV... Django Version: 2.2.12 Python Executable: /usr/bin/uwsgi-core Python Version: 3.8.10 Python Path: ['.', '', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Server time: Thu, 17 Aug 2023 17:13:09 +0000 Installed Applications: ('hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount', 'django_mailman3.lib.auth.fedora') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')
Traceback:
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py" in _execute 84. return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/mysql/base.py" in execute 71. return self.cursor.execute(query, args)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py" in execute 209. res = self._query(query)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py" in _query 315. db.query(q)
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py" in query 226. _mysql.connection.query(self, query)
The above exception ((1366, "Incorrect string value: '\\xF0\\x9F\\x90\\xBA\\x0A\\x0A...' for column 'content' at row 1")) was the direct cause of the following exception:
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in inner 34. response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response 115. response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response 113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/views/decorators/http.py" in inner 40. return func(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/hyperkitty/views/mailman.py" in _decorator 71. return func(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/decorators/csrf.py" in wrapped_view 54. return view_func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/hyperkitty/views/mailman.py" in archive 117. add_to_list(mlist_fqdn, msg)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/incoming.py" in add_to_list 153. email.save()
File "/usr/lib/python3/dist-packages/django/db/models/base.py" in save 740. self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py" in save_base 777. updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py" in _save_table 870. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/lib/python3/dist-packages/django/db/models/base.py" in _do_insert 907. return manager._insert([self], fields=fields, return_id=update_pk,
File "/usr/lib/python3/dist-packages/django/db/models/manager.py" in manager_method 82. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/lib/python3/dist-packages/django/db/models/query.py" in _insert 1186. return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py" in execute_sql 1375. cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py" in execute 67. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py" in _execute_with_wrappers 76. return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py" in _execute 84. return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py" in __exit__ 89. raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py" in _execute 84. return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/mysql/base.py" in execute 71. return self.cursor.execute(query, args)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py" in execute 209. res = self._query(query)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py" in _query 315. db.query(q)
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py" in query 226. _mysql.connection.query(self, query)
Exception Type: OperationalError at /hyperkitty/api/mailman/archive Exception Value: (1366, "Incorrect string value: '\\xF0\\x9F\\x90\\xBA\\x0A\\x0A...' for column 'content' at row 1") Request information: USER: AnonymousUser
Mail Person writes:
Hello everyone. I am trying to sort out an error happening when messages are sent to the mailman server. The emails are being sent to the list but I get this error each time:
Internal Server Error: /mailman3/hyperkitty/api/mailman/archive
OperationalError at /hyperkitty/api/mailman/archive (1366, "Incorrect string value: '\\xF0\\x9F\\x90\\xBA\\x0A\\x0A...' for column 'content' at row 1")
This looks like the MySQL "we don't do 4-byte UTF-8" bug.
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py" in execute 209. res = self._query(query)
and it is MySQL, so the problem is most likely that your MySQL is not configured to handle Unicode properly. See
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/K...
for a lot of information about this. All the posters have useful comments but start with Mark Sapiro's.
participants (2)
-
Mail Person
-
Stephen J. Turnbull