From 0066d716d167b7eb7903df96c49a7b9b3087dffe Mon Sep 17 00:00:00 2001 From: Mat Roscoe <1327963+badrobit@users.noreply.github.com> Date: Wed, 5 Feb 2025 09:56:35 -0800 Subject: [PATCH] fix(packets): correct dict iteration syntax in Telemetry.identify_packet The method was attempting to iterate over target_packets using tuple unpacking, but `.items()` was missing from the dict iteration. This would cause a TypeError since Python dictionaries require `.items()` for key-value pair iteration. Changed: `for _, packet in target_packets:` to: `for _, packet in target_packets.items():` This ensures proper dictionary key-value pair iteration when identifying packets in tlm_unique_id_mode. --- openc3/python/openc3/packets/telemetry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openc3/python/openc3/packets/telemetry.py b/openc3/python/openc3/packets/telemetry.py index c9d74542ed..1da294e44e 100644 --- a/openc3/python/openc3/packets/telemetry.py +++ b/openc3/python/openc3/packets/telemetry.py @@ -266,7 +266,7 @@ def identify(self, packet_data, target_names=None): target = self.system.targets[target_name] if target and target.tlm_unique_id_mode: # Iterate through the packets and see if any represent the buffer - for _, packet in target_packets: + for _, packet in target_packets.items(): if packet.identify(packet_data): return packet else: