Logic 2.0 Python Automation Gui pop-up connect/launch

Hello,

I am integrating to my setup Saleae basic 8 and Logic 2.4.10.
First of all, when I call manager.connect, GUI pop-up and close back. Is there a way to supress the gui pop-up?
I thought maybe manager.launch() as in the example code, would connect without GUI, however If I call it when GUI is closed, I get some error below. If I open the GUI first and execute, it works

grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = “failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10430: Connection refused”
debug_error_string = “UNKNOWN:failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10430: Connection refused {created_time:“2023-11-03T13:46:47.2443136+00:00”, grpc_status:14}”

So what is the difference between connect and launch APIs?

Best regards
Khulan

Hi @khulan.bayarsaikhan ,

We do not currently support running automation without the GUI. This is something we want to support, but we are not currently working on it.

launch() will start the Logic 2 process and close it when the manager is destroyed.
connect() will not launch Logic 2, and connects to an already-running instance.

Hope that clarifies things!

Ryan

Hi Ryan,

Thanks a lot!

1 Like

A little late reply, but a small tip to anyone doing similar.
I just start my python script with this

def main():
    # Just ensure logic is not already running. and brutally kill it.
    os.system("taskkill.exe /F /IM logic.exe /T")

Then I use Manager.launch to start logic.

NB: I am running on windows, but you can do similar with the killall command on Linux.

Has there been any progress on this on the saleae end? We are finding that Manager.launch isn’t working when run from our CICD environment but does work on our local tests.

@atakahashi At the moment, our Automation API still requires the GUI to be running.

I added a comment for you to the feature request post below so we can track your need for this:

In case it helps, we’ve found some success with running the Logic 2 software in a headless environment on Ubuntu. More information on this can be found below.