Based on the following error message which I can now reproduce reliably if I change something about a class’ Advanced Settings, I now think this has to do with Django not knowing how to connect to the db as utf8mb4. But I don’t know how to force Django to connect correctly on Palm, since there’s conflicting steps listed on other threads.
cms-worker-1 | [2024-07-21 16:22:15,710: INFO/ForkPoolWorker-1] Replacing CourseOutline for course-v1:MYORG+MYCLASS+V1 (version 669d34c1508444f20f6e1b84, 40 sequences)
cms-worker-1 | [2024-07-21 16:22:15,719: INFO/ForkPoolWorker-1] Found CourseContext for course-v1:MYORG+MYCLASS+V1, updating...
cms-worker-1 | [2024-07-21 16:22:15,901: ERROR/ForkPoolWorker-1] cms.djangoapps.contentstore.tasks.update_outline_from_modulestore_task[9dc63219-231f-4a2c-8ddd-8dbd889356f3]: Could not create course outline for course course-v1:MYORG+MYCLASS+V1
cms-worker-1 | Traceback (most recent call last):
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 581, in get_or_create
cms-worker-1 | return self.get(**kwargs), False
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
cms-worker-1 | raise self.model.DoesNotExist(
cms-worker-1 | openedx.core.djangoapps.content.learning_sequences.models.LearningSequence.DoesNotExist: LearningSequence matching query does not exist.
cms-worker-1 |
cms-worker-1 | During handling of the above exception, another exception occurred:
cms-worker-1 |
cms-worker-1 | Traceback (most recent call last):
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
cms-worker-1 | return self.cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
cms-worker-1 | return self.cursor.execute(query, args)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
cms-worker-1 | res = self._query(query)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
cms-worker-1 | db.query(q)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
cms-worker-1 | _mysql.connection.query(self, query)
cms-worker-1 | MySQLdb.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\xA7\\xA0Br...' for column 'title' at row 1")
cms-worker-1 |
cms-worker-1 | The above exception was the direct cause of the following exception:
cms-worker-1 |
cms-worker-1 | Traceback (most recent call last):
cms-worker-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/tasks.py", line 723, in update_outline_from_modulestore_task
cms-worker-1 | update_outline_from_modulestore(course_key)
cms-worker-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/outlines.py", line 385, in update_outline_from_modulestore
cms-worker-1 | replace_course_outline(course_outline_data, content_errors=content_errors)
cms-worker-1 | File "/opt/pyenv/versions/3.8.15/lib/python3.8/contextlib.py", line 75, in inner
cms-worker-1 | return func(*args, **kwds)
cms-worker-1 | File "/openedx/edx-platform/openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 406, in replace_course_outline
cms-worker-1 | _update_sequences(course_outline, course_context)
cms-worker-1 | File "/openedx/edx-platform/openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 474, in _update_sequences
cms-worker-1 | LearningSequence.objects.update_or_create(
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
cms-worker-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 608, in update_or_create
cms-worker-1 | obj, created = self.select_for_update().get_or_create(defaults, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 588, in get_or_create
cms-worker-1 | return self.create(**params), True
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 453, in create
cms-worker-1 | obj.save(force_insert=True, using=self.db)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/model_utils/models.py", line 38, in save
cms-worker-1 | super().save(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
cms-worker-1 | self.save_base(using=using, force_insert=force_insert,
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 776, in save_base
cms-worker-1 | updated = self._save_table(
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 881, in _save_table
cms-worker-1 | results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 919, in _do_insert
cms-worker-1 | return manager._insert(
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
cms-worker-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 1270, in _insert
cms-worker-1 | return query.get_compiler(using=using).execute_sql(returning_fields)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1416, in execute_sql
cms-worker-1 | cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
cms-worker-1 | return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
cms-worker-1 | return executor(sql, params, many, context)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
cms-worker-1 | return self.cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
cms-worker-1 | raise dj_exc_value.with_traceback(traceback) from exc_value
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
cms-worker-1 | return self.cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
cms-worker-1 | return self.cursor.execute(query, args)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
cms-worker-1 | res = self._query(query)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
cms-worker-1 | db.query(q)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
cms-worker-1 | _mysql.connection.query(self, query)
cms-worker-1 | django.db.utils.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\xA7\\xA0Br...' for column 'title' at row 1")
cms-worker-1 | [2024-07-21 16:22:15,906: ERROR/ForkPoolWorker-1] Task cms.djangoapps.contentstore.tasks.update_outline_from_modulestore_task[9dc63219-231f-4a2c-8ddd-8dbd889356f3] raised unexpected: OperationalError(1366, "Incorrect string value: '\\xF0\\x9F\\xA7\\xA0Br...' for column 'title' at row 1")
cms-worker-1 | Traceback (most recent call last):
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 581, in get_or_create
cms-worker-1 | return self.get(**kwargs), False
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
cms-worker-1 | raise self.model.DoesNotExist(
cms-worker-1 | openedx.core.djangoapps.content.learning_sequences.models.LearningSequence.DoesNotExist: LearningSequence matching query does not exist.
cms-worker-1 |
cms-worker-1 | During handling of the above exception, another exception occurred:
cms-worker-1 |
cms-worker-1 | Traceback (most recent call last):
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
cms-worker-1 | return self.cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
cms-worker-1 | return self.cursor.execute(query, args)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
cms-worker-1 | res = self._query(query)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
cms-worker-1 | db.query(q)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
cms-worker-1 | _mysql.connection.query(self, query)
cms-worker-1 | MySQLdb.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\xA7\\xA0Br...' for column 'title' at row 1")
cms-worker-1 |
cms-worker-1 | The above exception was the direct cause of the following exception:
cms-worker-1 |
cms-worker-1 | Traceback (most recent call last):
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
cms-worker-1 | R = retval = fun(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
cms-worker-1 | return self.run(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/edx_django_utils/monitoring/internal/code_owner/utils.py", line 193, in new_function
cms-worker-1 | return wrapped_function(*args, **kwargs)
cms-worker-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/tasks.py", line 723, in update_outline_from_modulestore_task
cms-worker-1 | update_outline_from_modulestore(course_key)
cms-worker-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/outlines.py", line 385, in update_outline_from_modulestore
cms-worker-1 | replace_course_outline(course_outline_data, content_errors=content_errors)
cms-worker-1 | File "/opt/pyenv/versions/3.8.15/lib/python3.8/contextlib.py", line 75, in inner
cms-worker-1 | return func(*args, **kwds)
cms-worker-1 | File "/openedx/edx-platform/openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 406, in replace_course_outline
cms-worker-1 | _update_sequences(course_outline, course_context)
cms-worker-1 | File "/openedx/edx-platform/openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 474, in _update_sequences
cms-worker-1 | LearningSequence.objects.update_or_create(
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
cms-worker-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 608, in update_or_create
cms-worker-1 | obj, created = self.select_for_update().get_or_create(defaults, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 588, in get_or_create
cms-worker-1 | return self.create(**params), True
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 453, in create
cms-worker-1 | obj.save(force_insert=True, using=self.db)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/model_utils/models.py", line 38, in save
cms-worker-1 | super().save(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
cms-worker-1 | self.save_base(using=using, force_insert=force_insert,
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 776, in save_base
cms-worker-1 | updated = self._save_table(
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 881, in _save_table
cms-worker-1 | results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 919, in _do_insert
cms-worker-1 | return manager._insert(
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
cms-worker-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 1270, in _insert
cms-worker-1 | return query.get_compiler(using=using).execute_sql(returning_fields)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1416, in execute_sql
cms-worker-1 | cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
cms-worker-1 | return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
cms-worker-1 | return executor(sql, params, many, context)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
cms-worker-1 | return self.cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
cms-worker-1 | raise dj_exc_value.with_traceback(traceback) from exc_value
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
cms-worker-1 | return self.cursor.execute(sql, params)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
cms-worker-1 | return self.cursor.execute(query, args)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
cms-worker-1 | res = self._query(query)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
cms-worker-1 | db.query(q)
cms-worker-1 | File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
cms-worker-1 | _mysql.connection.query(self, query)
cms-worker-1 | django.db.utils.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\xA7\\xA0Br...' for column 'title' at row 1")
cms-worker-1 | [2024-07-21 16:22:15,935: WARNING/ForkPoolWorker-1] /openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/base.py:208: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
cms-worker-1 | warnings.warn(message, category=ElasticsearchWarning)