Error executing query: NoneType object has no attribute cursor

I am going down the list of log and trying to see if I can fix some of these errors I am having. Can someone point to where I should be looking for this error? These sensors I have, but I don’t remember adding the word cursor to any of the yaml file.

Error executing query: (builtins.AttributeError) ‘NoneType’ object has no attribute ‘cursor’ [SQL: SELECT states.domain AS states_domain, states.entity_id AS states_entity_id, states.state AS states_state, states.attributes AS states_attributes, states.last_changed AS states_last_changed, states.last_updated AS states_last_updated FROM states WHERE (states.domain IN (%s, %s, %s, %s, %s) OR states.last_changed = states.last_updated) AND states.last_updated > %s AND states.entity_id IN ([EXPANDING_entity_ids]) AND states.last_updated < %s ORDER BY states.entity_id, states.last_updated] [parameters: [{‘start_time’: datetime.datetime(2020, 11, 3, 2, 9, 7, 840000, tzinfo=), ‘end_time’: datetime.datetime(2020, 11, 4, 2, 9, 7, 840000, tzinfo=), ‘entity_ids’: [‘sensor.ha_cpu_temperature’]}]]
Error executing query: (builtins.AttributeError) ‘NoneType’ object has no attribute ‘cursor’ [SQL: SELECT states.domain AS states_domain, states.entity_id AS states_entity_id, states.state AS states_state, states.attributes AS states_attributes, states.last_changed AS states_last_changed, states.last_updated AS states_last_updated FROM states WHERE states.last_updated < %s AND states.entity_id = %s ORDER BY states.last_updated DESC LIMIT %s] [parameters: [{‘utc_point_in_time’: datetime.datetime(2020, 11, 3, 2, 13, 29, 619000, tzinfo=), ‘entity_id’: ‘sensor.ws1_temperature’}]]
Error executing query: (builtins.AttributeError) ‘NoneType’ object has no attribute ‘cursor’ [SQL: SELECT states.domain AS states_domain, states.entity_id AS states_entity_id, states.state AS states_state, states.attributes AS states_attributes, states.last_changed AS states_last_changed, states.last_updated AS states_last_updated FROM states WHERE (states.domain IN (%s, %s, %s, %s, %s) OR states.last_changed = states.last_updated) AND states.last_updated > %s AND states.entity_id IN ([EXPANDING_entity_ids]) AND states.last_updated < %s ORDER BY states.entity_id, states.last_updated] [parameters: [{‘start_time’: datetime.datetime(2020, 11, 4, 2, 22, 25, 873000, tzinfo=), ‘end_time’: datetime.datetime(2020, 11, 4, 2, 23, 27, 713000, tzinfo=), ‘entity_ids’: [‘sensor.ps1_temperature’]}]]