last error: UNAVAILABLE: ipv4:127.0.0.1:10430: ConnectEx: Connection refused (No connection could be made because the target machine actively refused it
Is the Logic 2 process getting spawned, and is the port/automation setup? Can you run the same Manager.launch() command from a python script outside of the VS Code environment?
Some ideas on Automation launch:
And another thread about launching the GUI from a script:
And finally, one talking specifically about launching from within VS Code:
I noticed some possible fixes:
Use the Electron/VS Code work around: del os.environ['ELECTRON_RUN_AS_NODE']
If using Manager.launch() make sure client is not running before launching (i.e., kill off any existing process first)
Use with automation.Manager.launch() as manager: syntax, so the Manager object is not prematurely destroyed
(client automatically stopped when Manager destroyed)
Use Manager.connect() instead of Manager.launch() and make sure client is already running before trying to connect
(e.g., could use a separate automated method to start Logic 2 process, or just start manually)