After upgrading from Olive (tutor 15.3.7) to Palm (tutor 16.1.1) some of users who have activities in discussions, exams, assignments, etc get 500 error on dashboard. The log for the said error is as follows:
ERROR 35 [openedx.core.djangoapps.content.course_overviews.models] models.py:339 - Saving CourseOverview for course course-v1:sample-organization-33001+T1-1402 failed with unexpected exception!
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA3\\xD8\\xAA...' for column 'short_description' at row 1")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/openedx/edx-platform/./openedx/core/djangoapps/content/course_overviews/models.py", line 305, in load_from_module_store
course_overview.save()
File "/openedx/venv/lib/python3.8/site-packages/model_utils/models.py", line 38, in save
super().save(*args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
self.save_base(using=using, force_insert=force_insert,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 776, in save_base
updated = self._save_table(
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 858, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 912, in _do_update
return filtered._update(values) > 0
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 802, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql
cursor = super().execute_sql(result_type)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 616, in execute
return real_execute(self, sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA3\\xD8\\xAA...' for column 'short_description' at row 1")
2023-09-27 08:48:28,131 ERROR 35 [root] [user None] [ip None] signals.py:22 - Uncaught exception from None
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA3\\xD8\\xAA...' for column 'short_description' at row 1")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/openedx/venv/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 84, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/opt/pyenv/versions/3.8.15/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/openedx/edx-platform/./lms/djangoapps/course_home_api/course_metadata/views.py", line 80, in get
course = course_detail(request, request.user.username, course_key)
File "/openedx/edx-platform/./lms/djangoapps/course_api/api.py", line 76, in course_detail
overview = get_course_overview_with_access(
File "/openedx/edx-platform/./lms/djangoapps/courseware/courses.py", line 128, in get_course_overview_with_access
course_overview = CourseOverview.get_from_id(course_key)
File "/openedx/edx-platform/./openedx/core/lib/cache_utils.py", line 74, in decorator
result = wrapped(*args, **kwargs)
File "/openedx/edx-platform/./openedx/core/djangoapps/content/course_overviews/models.py", line 407, in get_from_id
course_overview = cls.load_from_module_store(course_id)
File "/openedx/edx-platform/./openedx/core/djangoapps/content/course_overviews/models.py", line 305, in load_from_module_store
course_overview.save()
File "/openedx/venv/lib/python3.8/site-packages/model_utils/models.py", line 38, in save
super().save(*args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
self.save_base(using=using, force_insert=force_insert,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 776, in save_base
updated = self._save_table(
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 858, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 912, in _do_update
return filtered._update(values) > 0
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 802, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql
cursor = super().execute_sql(result_type)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 616, in execute
return real_execute(self, sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA3\\xD8\\xAA...' for column 'short_description' at row 1")
[pid: 7|app: 0|req: 957/2492] 172.18.0.4 () {60 vars in 3613 bytes} [Wed Sep 27 08:48:28 2023] GET /api/notifications/count/ => generated 10117 bytes in 133 msecs (HTTP/1.1 404) 10 headers in 939 bytes (1 switches on core 0)
2023-09-27 08:48:28,208 ERROR 35 [django.request] [user 40] [ip 37.98.105.95] log.py:224 - Internal Server Error: /api/course_home/course_metadata/course-v1:Sharifstar+IOI-33001+T1-1402
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA3\\xD8\\xAA...' for column 'short_description' at row 1")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/openedx/venv/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 84, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/opt/pyenv/versions/3.8.15/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/openedx/edx-platform/./lms/djangoapps/course_home_api/course_metadata/views.py", line 80, in get
course = course_detail(request, request.user.username, course_key)
File "/openedx/edx-platform/./lms/djangoapps/course_api/api.py", line 76, in course_detail
overview = get_course_overview_with_access(
File "/openedx/edx-platform/./lms/djangoapps/courseware/courses.py", line 128, in get_course_overview_with_access
course_overview = CourseOverview.get_from_id(course_key)
File "/openedx/edx-platform/./openedx/core/lib/cache_utils.py", line 74, in decorator
result = wrapped(*args, **kwargs)
File "/openedx/edx-platform/./openedx/core/djangoapps/content/course_overviews/models.py", line 407, in get_from_id
course_overview = cls.load_from_module_store(course_id)
File "/openedx/edx-platform/./openedx/core/djangoapps/content/course_overviews/models.py", line 305, in load_from_module_store
course_overview.save()
File "/openedx/venv/lib/python3.8/site-packages/model_utils/models.py", line 38, in save
super().save(*args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
self.save_base(using=using, force_insert=force_insert,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 776, in save_base
updated = self._save_table(
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 858, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 912, in _do_update
return filtered._update(values) > 0
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 802, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql
cursor = super().execute_sql(result_type)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 616, in execute
return real_execute(self, sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA3\\xD8\\xAA...' for column 'short_description' at row 1")
Does any one know how I should fix this? Should I restore from a backup and redo the upgrade?