@benc Hi! I’ve noticed an error in our Jenkins CI instance, for MariaDB and Python 3.12, where we get the following error:
django.db.utils.OperationalError: (1918, "Encountered illegal value 'μg/mL' when converting to latin1")
This definitely seems related to this change so I was hoping if you would have some time to debug and evaluate.
Synchronizing apps without migrations:
Creating tables...
Creating table django_content_type
Creating table auth_permission
...
Creating table constraints_product
Traceback (most recent call last):
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/mysql/base.py", line 76, in execute
return self.cursor.execute(query, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/.env/lib/python3.12/site-packages/MySQLdb/cursors.py", line 179, in execute
res = self._query(mogrified_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/.env/lib/python3.12/site-packages/MySQLdb/cursors.py", line 330, in _query
db.query(q)
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/.env/lib/python3.12/site-packages/MySQLdb/connections.py", line 265, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1918, "Encountered illegal value 'μg/mL' when converting to latin1")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/./runtests.py", line 787, in <module>
failures = django_tests(
^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/./runtests.py", line 425, in django_tests
failures = test_runner.run_tests(test_labels)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/test/runner.py", line 1089, in run_tests
old_config = self.setup_databases(
^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/test/runner.py", line 987, in setup_databases
return _setup_databases(
^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/test/utils.py", line 206, in setup_databases
connection.creation.create_test_db(
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/base/creation.py", line 78, in create_test_db
call_command(
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/core/management/__init__.py", line 194, in call_command
return command.execute(*args, **defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/core/management/base.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/core/management/base.py", line 107, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/core/management/commands/migrate.py", line 323, in handle
self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/core/management/commands/migrate.py", line 485, in sync_apps
editor.create_model(model)
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/base/schema.py", line 505, in create_model
self.execute(sql, params or None)
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/base/schema.py", line 202, in execute
cursor.execute(sql, params)
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/utils.py", line 79, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/utils.py", line 92, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/utils.py", line 100, in _execute
with self.db.wrap_database_errors:
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/django/db/backends/mysql/base.py", line 76, in execute
return self.cursor.execute(query, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/.env/lib/python3.12/site-packages/MySQLdb/cursors.py", line 179, in execute
res = self._query(mogrified_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/.env/lib/python3.12/site-packages/MySQLdb/cursors.py", line 330, in _query
db.query(q)
File "/home/jenkins/workspace/django-mariadb/database/mysql/label/mariadb/python/python3.12/tests/.env/lib/python3.12/site-packages/MySQLdb/connections.py", line 265, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1918, "Encountered illegal value 'μg/mL' when converting to latin1")