From e47449812c2b2e1485bab9dac1ab260332300845 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 09:47:28 -0400 Subject: [PATCH] Update transmit.py exception around frequency.txt --- transmit.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index 5308e3f2..45555417 100644 --- a/transmit.py +++ b/transmit.py @@ -356,10 +356,13 @@ def update_doppler(fm="yes"): global txr global rigctl ## print("update_doppler") - - with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: - frequencies = file.read().split() - + try: + with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: + frequencies = file.read().split() + except Exception as e: + print(f"An error occurred: {e}") + print("reading frequency.txt failed") + tx_frequency = int(frequencies[0]) if (len(frequencies) > 1): rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency