diff --git a/src/tlo/methods/healthsystem.py b/src/tlo/methods/healthsystem.py index bfdf75b38c..c91a6f970d 100644 --- a/src/tlo/methods/healthsystem.py +++ b/src/tlo/methods/healthsystem.py @@ -2456,7 +2456,14 @@ def process_events_mode_2(self, hold_over: List[HSIEventQueueItem]) -> None: # remove them from list of available officers. for officer, call in updated_call.items(): if capabilities_monitor[officer] <= 0: - set_capabilities_still_available.remove(officer) + if officer in set_capabilities_still_available: + set_capabilities_still_available.remove(officer) + else: + logger.warning( + key="message", + data=(f"{event.TREATMENT_ID} actual_footprint requires different" + f"officers than expected_footprint.") + ) # Update today's footprint based on actuall call and squeeze factor self.module.running_total_footprint -= original_call