2024.7.1 creates problems with the recorder

I tried to install 2024.7.0 twice, and 2024.7.1 once. Each time, the recorder started not to work. I am copying the details of the related log entries below. Reloading a past full backup restores a working system. Any suggestion on what is happening?

Thanks

Logger: homeassistant.components.recorder.core
Source: components/recorder/core.py:911
integration: Recorder (documentation, issues)
First occurred: 00:29:25 (3 occurrences)
Last logged: 00:35:10

Error while processing event CompileMissingStatisticsTask()
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 6, 22, 25, tzinfo=datetime.timezone.utc), fire_events=True)
Error while processing event StatisticsTask(start=datetime.datetime(2024, 7, 6, 22, 30, tzinfo=datetime.timezone.utc), fire_events=True)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 911, in _guarded_process_one_task_or_event_or_recover
    self._process_one_task_or_event_or_recover(task)
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 931, in _process_one_task_or_event_or_recover
    task.run(self)
  File "/usr/src/homeassistant/homeassistant/components/recorder/tasks.py", line 178, in run
    if statistics.compile_missing_statistics(instance):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 644, in wrapper
    return job(instance, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 477, in compile_missing_statistics
    modified_statistic_ids = _compile_statistics(
                             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 559, in _compile_statistics
    compiled: PlatformCompiledStatistics = platform_compile_statistics(
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 400, in compile_statistics
    sensor_states = _get_sensor_states(hass)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 92, in _get_sensor_states
    and (not entity_filter or entity_filter(state.entity_id))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/places/recorder_history_prefilter/recorder_prefilter.py", line 123, in entity_filter
    return recorder_entity_filter(entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:137
integration: Recorder (documentation, issues)
First occurred: 00:29:25 (3 occurrences)
Last logged: 00:35:10

Error executing query
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 137, in session_scope
    yield session
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 477, in compile_missing_statistics
    modified_statistic_ids = _compile_statistics(
                             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 559, in _compile_statistics
    compiled: PlatformCompiledStatistics = platform_compile_statistics(
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 400, in compile_statistics
    sensor_states = _get_sensor_states(hass)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/recorder.py", line 92, in _get_sensor_states
    and (not entity_filter or entity_filter(state.entity_id))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/places/recorder_history_prefilter/recorder_prefilter.py", line 123, in entity_filter
    return recorder_entity_filter(entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

Logger: homeassistant.core
Source: core.py:1559
First occurred: 00:27:11 (2487 occurrences)
Last logged: 00:38:47

Error running job: <Job listen * HassJobType.Callback <function Recorder.async_initialize.<locals>._event_listener at 0x7fc941dadf80>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1559, in async_fire_internal
    self._hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 330, in _event_listener
    if entity_filter(entity_id):
       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/places/recorder_history_prefilter/recorder_prefilter.py", line 123, in entity_filter
    return recorder_entity_filter(entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

This seems related to this post. Sorry, I should have searched better.

Updating the places integration as suggested in the post linked above solved the issue.

Good you got your issue solved!

Now, before you go… please take the time to mark the solution as the answer, you do that by selecting the three dots under the post:

image

Then select the check box:

image
By doing so this can be useful to other users as well and prevents that someone else steps in and still tries to help you.

1 Like

I also needed to disable the auto purge as indicated in the link above. It now looks good.