Version of the custom_component
0.9.1
Describe the bug
One Youtube channel (channel_id: UCFHtCB_FWXQ8GpjgfYcD8-g) has lot of database commit errors. I think that smileys that channel creator often uses in comments can be cause for that. Database software is MariaDB 2.5.1 (Home Assistant add-on).
**log 1/2 **
`Logger: homeassistant.components.recorder.core
Source: components/recorder/core.py:941
Integration: Recorder (documentation, issues)
First occurred: 10:06:08 (66 occurrences)
Last logged: 20:26:08
SQLAlchemyError error processing task CommitTask(): This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 16, 54, 23, 976357, tzinfo=datetime.timezone.utc), None, 1446853, '01GF3ZG1F8H6SW8PS7JWG3BJN5', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8) (Background on this error at: https://sqlalche.me/e/14/7s2a)
SQLAlchemyError error processing task CommitTask(): This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 2, 54, 180644, tzinfo=datetime.timezone.utc), None, 1446903, '01GF3ZZKQ4MN3EZWN6CGDJESKQ', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8) (Background on this error at: https://sqlalche.me/e/14/7s2a)
SQLAlchemyError error processing task CommitTask(): This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 9, 24, 157669, tzinfo=datetime.timezone.utc), None, 1446959, '01GF40BGHX29CYY5CCMQJ4VH3A', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8) (Background on this error at: https://sqlalche.me/e/14/7s2a)
SQLAlchemyError error processing task CommitTask(): This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 20, 54, 663805, tzinfo=datetime.timezone.utc), None, 1447030, '01GF410JW7MR4PXZVZF8X8BS8Z', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8) (Background on this error at: https://sqlalche.me/e/14/7s2a)
SQLAlchemyError error processing task CommitTask(): This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 25, 54, 165620, tzinfo=datetime.timezone.utc), None, 1447056, '01GF419QBNR39RT4Z5HGMND3FW', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8) (Background on this error at: https://sqlalche.me/e/14/7s2a)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 673, in _process_one_task_or_recover
self._commit_event_session_or_retry()
File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 922, in _commit_event_session_or_retry
self._commit_event_session()
File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 941, in _commit_event_session
self.event_session.commit()
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1451, in commit
self._transaction.commit(_to_root=self.future)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 827, in commit
self._assert_active(prepared_ok=True)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 601, in _assert_active
raise sa_exc.PendingRollbackError(
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1")
[SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), None, 1443375, '01GF2XTD3MJZQMFTAFSMFNZT09', None, None, 0)]
(Background on this error at: https://sqlalche.me/e/14/e3q8) (Background on this error at: https://sqlalche.me/e/14/7s2a)
`
log 2/2
`Logger: homeassistant.components.recorder.core
Source: components/recorder/core.py:649
Integration: Recorder (documentation, issues)
First occurred: 10:06:05 (66 occurrences)
Last logged: 20:26:05
Error in database connectivity during commit: Error executing query: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 16, 54, 23, 976357, tzinfo=datetime.timezone.utc), None, 1446853, '01GF3ZG1F8H6SW8PS7JWG3BJN5', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8). (retrying in 3 seconds)
Error in database connectivity during commit: Error executing query: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 2, 54, 180644, tzinfo=datetime.timezone.utc), None, 1446903, '01GF3ZZKQ4MN3EZWN6CGDJESKQ', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8). (retrying in 3 seconds)
Error in database connectivity during commit: Error executing query: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 9, 24, 157669, tzinfo=datetime.timezone.utc), None, 1446959, '01GF40BGHX29CYY5CCMQJ4VH3A', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8). (retrying in 3 seconds)
Error in database connectivity during commit: Error executing query: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 20, 54, 663805, tzinfo=datetime.timezone.utc), None, 1447030, '01GF410JW7MR4PXZVZF8X8BS8Z', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8). (retrying in 3 seconds)
Error in database connectivity during commit: Error executing query: (MySQLdb.OperationalError) (1366, "Incorrect string value: '\xF0\x9F\x8E\xA5 @...' for column homeassistant
.states
.state
at row 1") [SQL: INSERT INTO states (entity_id, state, attributes, event_id, last_changed, last_updated, old_state_id, attributes_id, context_id, context_user_id, context_parent_id, origin_idx) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)] [parameters: ('sensor.passenger', 'So nice to be back in Australia! Here’s a bit of @natalie Imbruglia in Fremantle.🎥 @jarrad Seng', None, None, datetime.datetime(2022, 10, 11, 7, 5, 51, 988247, tzinfo=datetime.timezone.utc), datetime.datetime(2022, 10, 11, 17, 25, 54, 165620, tzinfo=datetime.timezone.utc), None, 1447056, '01GF419QBNR39RT4Z5HGMND3FW', None, None, 0)] (Background on this error at: https://sqlalche.me/e/14/e3q8). (retrying in 3 seconds)`