When the save_dir contains spaces in the path, the current MSO.capture() function does not wrap the CLI argument in quotes so it fails.
Need to update the MSO.capture() method to be
...
self.wrapper.run(
"cli",
"capture",
"record-data",
"--json",
"--args-path",
f"'{str(record_options_path.absolute())}'",
"--out",
f"'{str(result_path.absolute())}'",
timeout_secs=timeout_secs,
)
...
Side note is the documentation ( Contributing — Saleae MSO API Documentation ) says that the API repo is on github but it appears to be private so PRs and issues can’t be created there.