Issue with Automation API (MSO device, 2.4.44, Apple Silicon)

Hi, I am trying to do a get_device() using Automation API for MSO device:

I am on version 2.4.44, MacOS host with Apple Silion.

Automation is enabled, server address http://127.0.0.1:10430

I am using the following cmds:

% python3 -m pip install logic2-automation --quiet

% python3 -c “from saleae import automation; m=automation.Manager.connect(port=10430); print(m.get_devices())”

INFO:saleae.automation.manager:sub ChannelConnectivity.IDLE
INFO:saleae.automation.manager:sub ChannelConnectivity.CONNECTING
INFO:saleae.automation.manager:sub ChannelConnectivity.READY

It hangs at this point

Any ideas why? Thanks in advance for your help!

Note that if I swap MSO with Logic Pro 16 (No change in host HW/SW), I am able to get the device:

% python3 -c “from saleae import automation; m=automation.Manager.connect(port=10430); print(m.get_devices())”
INFO:saleae.automation.manager:sub ChannelConnectivity.IDLE
INFO:saleae.automation.manager:sub ChannelConnectivity.CONNECTING
INFO:saleae.automation.manager:sub ChannelConnectivity.READY
[DeviceDesc(device_id=‘5A70BBAA8F54B51’, device_type=<DeviceType.LOGIC_PRO_16: 6>, is_simulation=False)]

For MSO, it just printed an empty string:

INFO:saleae.automation.manager:sub ChannelConnectivity.IDLE
INFO:saleae.automation.manager:sub ChannelConnectivity.CONNECTING
INFO:saleae.automation.manager:sub ChannelConnectivity.READY
[]

@yi_han Sorry for the trouble with that!

For Logic MSO automation, you will need to use the MSO API linked below:

The Automation API linked here (where get_devices() comes from) is not compatible with Logic MSO.

Hi Tim, Thanks a lot for the information! Let me try it and get back to you if I need more help.

—yi

Hi Tim, Need your help here:

After running cmd: “pip3 install saleae-mso-api --extra-index-url https://downloads.saleae.com/pypi/

I am only getting a defensive package. Any idea why? Thanks a lot!

% pip3 show saleae-mso-api

Name: saleae-mso-api

Version: 0.0.1

Summary: Defensive package-name reservation notice for a potential supply-chain risk.

Home-page: https://bluebear.io

Author:

Author-email:

License: SEE NOTICE.md

Location: /Users/yi_han/Library/Python/3.9/lib/python/site-packages

Requires:

Required-by:

Hi, I am able to install it now (virtual environment helped)

% uv pip show saleae_mso_api

Name: saleae-mso-api

Version: 0.4.0

Location: ~/.venv/lib/python3.11/site-packages

Requires: numpy, psutil, pyusb

Required-by:

But encounter a new issue when running the sample code from Getting Started - Saleae API Documentation

% .venv/bin/python sample.py

Traceback (most recent call last):

File “~/sample.py”, line 5, in

mso = mso_api.MSO(serial_number="7B33M")

      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “~/.venv/lib/python3.11/site-packages/saleae/mso_api/mso_device.py”, line 40, in _init_

self.wrapper = wrapper or MsoWrapper(serial_number)

                          ^^^^^^^^^^^^^^^^^^^^^^^^^

File “.venv/lib/python3.11/site-packages/saleae/mso_api/wrapper.py”, line 136, in _init_

if proc.name() == get_binary_tool_path().name:

                  ^^^^^^^^^^^^^^^^^^^^^^

File “~/.venv/lib/python3.11/site-packages/saleae/mso_api/wrapper.py”, line 62, in get_binary_tool_path

path = repo_root / "bin" / TO_PLATFORM_DIR\[platform.system()\] / f"mso_data_recorder{suffix}"

                           \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~^^^^^^^^^^^^^^^^^^^

KeyError: ‘Darwin’

Exception ignored in: <function MSO._del_ at 0x102a41260>

Traceback (most recent call last):

File “~/.venv/lib/python3.11/site-packages/saleae/mso_api/mso_device.py”, line 104, in _del_

self.close()

File “~/.venv/lib/python3.11/site-packages/saleae/mso_api/mso_device.py”, line 101, in close

self.wrapper.close()

^^^^^^^^^^^^

AttributeError: ‘MSO’ object has no attribute ‘wrapper’

I am on macOS 15.6

Thanks for any suggestions.

@yi_han Glad to hear you were able to install it successfully! We’ll look into the new issue you are running into.

Hi @yi_han,

We just tried reproducing your issue, and we managed to find a different serious issue, oddly enough, also MacOS specific. We’ve internally fixed it and will ship it as soon as we can push it through testing.

The error you’re seeing, KeyError: ‘Darwin’ sounds a lot like you might be using a much older version of our MSO API, from before we added MacOS support. The object TO_PLATFORM_DIR does have a key called “Darwin” in it, which we added in version 0.5.2, in October of 2025.

In the meantime, could you test it out on your machine? You can download it here:

That’s a zip file that you can decompress to get the wheel file, saleae_mso_api-0.5.8-py3-none-any.whl.

Basic testing:

mkdir mso-api-test
cd mso-api-test
python -m venv .venv
source .venv/bin/activate
pip install ../saleae_mso_api-0.5.8-py3-none-any.whl
# copy and paste in the sample script here.
python sample.py

Sample script taken from here: Getting Started - Saleae API Documentation

from pathlib import Path
import numpy as np
from saleae import mso_api

mso = mso_api.MSO()

capture_config = mso_api.CaptureConfig(
    enabled_channels=[mso_api.AnalogChannel(channel=0, name="clock")],
    analog_settings=mso_api.AnalogSettings(sample_rate=100e6),
    capture_settings=mso_api.TimedCapture(capture_length_seconds=0.1),
)

for n in range(3):
    save_dir = Path('my-captures') / f'{n:02d}'
    capture = mso.capture(capture_config, save_dir=save_dir)
    avg_voltage = np.mean(capture.analog_data["clock"].voltages)
    print(f"Capture {n:02d} in {save_dir} avg voltage: {avg_voltage:.3f} V")

The expected output should look like this:

Capture 00 in my-captures/00 avg voltage: -0.018 V
Capture 01 in my-captures/01 avg voltage: -0.016 V
Capture 02 in my-captures/02 avg voltage: -0.016 V

If your MSO is not plugged in, you will get this:

Mso not found
retcode=1 

Hello,

The issue I originally reproduced was fixed and just shipped in 0.5.8.

I had installed it with pip, so I updated it like so:

pip install --upgrade saleae-mso-api --extra-index-url https://downloads.saleae.com/pypi/

Please let me know if you have any issues with it!