From e89a0ef486271a22d413b8e8c791588fad0266ec Mon Sep 17 00:00:00 2001 From: Smittix Date: Mon, 2 Mar 2026 16:35:25 +0000 Subject: [PATCH] fix: pass config file path (not directory) to radiosonde_auto_rx -c flag Reverts the incorrect assumption from f8e5d61 that -c expects a directory. The auto_rx -c flag expects the full path to station.cfg. Passing the directory caused "Config file ... does not exist!" on start. Co-Authored-By: Claude Opus 4.6 --- routes/radiosonde.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/radiosonde.py b/routes/radiosonde.py index 0d4ef10..c2f33e9 100644 --- a/routes/radiosonde.py +++ b/routes/radiosonde.py @@ -576,12 +576,12 @@ def start_radiosonde(): logger.error(f"Failed to generate radiosonde config: {e}") return jsonify({'status': 'error', 'message': str(e)}), 500 - # Build command - auto_rx -c expects a config DIRECTORY containing station.cfg - cfg_dir = os.path.dirname(os.path.abspath(cfg_path)) + # Build command - auto_rx -c expects the path to station.cfg + cfg_abs = os.path.abspath(cfg_path) if auto_rx_path.endswith('.py'): - cmd = [sys.executable, auto_rx_path, '-c', cfg_dir] + cmd = [sys.executable, auto_rx_path, '-c', cfg_abs] else: - cmd = [auto_rx_path, '-c', cfg_dir] + cmd = [auto_rx_path, '-c', cfg_abs] # Set cwd to the auto_rx directory so 'from autorx.scan import ...' works auto_rx_dir = os.path.dirname(os.path.abspath(auto_rx_path))