From 6737a58f0372c316cb2e54d9a73a72ea41db29da Mon Sep 17 00:00:00 2001 From: Max Rothman Date: Wed, 28 Jan 2026 14:56:50 -0800 Subject: [PATCH 1/2] Fix null check for device status responses in CLI streaming The *_with_status() methods return None on gRPC errors, but configure_device(), start_device(), and stop_device() were accessing .code without checking for None first. This caused "'NoneType' object has no attribute 'code'" errors when device operations failed. --- synapse/cli/streaming.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/synapse/cli/streaming.py b/synapse/cli/streaming.py index 9c9c7b7..dc758d5 100644 --- a/synapse/cli/streaming.py +++ b/synapse/cli/streaming.py @@ -593,6 +593,9 @@ def configure_device(device, config, console): # Apply the configuration to the device configure_status = device.configure_with_status(config) + if configure_status is None: + console.print("[bold red]Failed to configure device: connection error[/bold red]") + return False if configure_status.code != StatusCode.kOk: console.print( f"[bold red]Failed to configure device: {configure_status.message}[/bold red]" @@ -610,6 +613,9 @@ def start_device(device, console): with console.status("Starting device...", spinner="bouncingBall"): start_status = device.start_with_status() + if start_status is None: + console.print("[bold red]Failed to start device: connection error[/bold red]") + return False if start_status.code != StatusCode.kOk: console.print( f"[bold red]Failed to start device: {start_status.message}[/bold red]" @@ -621,6 +627,9 @@ def start_device(device, console): def stop_device(device, console): with console.status("Stopping device...", spinner="bouncingBall"): stop_status = device.stop_with_status() + if stop_status is None: + console.print("[bold red]Failed to stop device: connection error[/bold red]") + return False if stop_status.code != StatusCode.kOk: console.print( f"[bold red]Failed to stop device: {stop_status.message}[/bold red]" From ca97663e7e9f748b2f5920f170e58375283b54db Mon Sep 17 00:00:00 2001 From: namthor9 Date: Wed, 28 Jan 2026 17:04:46 -0800 Subject: [PATCH 2/2] bump version 2.4.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fd83dae..979f071 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="science-synapse", - version="2.4.0", + version="2.4.1", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz",