fix: set cwd for radiosonde subprocess so autorx package imports resolve

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-27 11:15:50 +00:00
parent 997dac3b9f
commit 952736c127
+4
View File
@@ -420,6 +420,9 @@ def start_radiosonde():
else:
cmd = [auto_rx_path, '-c', cfg_dir]
# 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))
try:
logger.info(f"Starting radiosonde_auto_rx: {' '.join(cmd)}")
app_module.radiosonde_process = subprocess.Popen(
@@ -427,6 +430,7 @@ def start_radiosonde():
stdout=subprocess.DEVNULL,
stderr=subprocess.PIPE,
start_new_session=True,
cwd=auto_rx_dir,
)
# Wait briefly for process to start