Automatization API add_analyzer blocks ad infinitum

Hello,

The first time I execute the following script after starting up Logic 2 program , the code below works as expected. The second time it blocks forever in the add_analyzer block. What could be the issue? Thanks!

		cls.manager = automation.Manager.connect(port=10430)

        device_configuration = automation.LogicDeviceConfiguration(
            enabled_digital_channels=digital_channels,
            digital_sample_rate=digital_baudrate_hz,
            enabled_analog_channels=analog_channels,
            analog_sample_rate=analog_baudrate_hz,
            #digital_threshold_volts=3.3,
        )

        if capture_seconds is None:
        # Record 5 seconds of data before stopping the capture
            capture_configuration = automation.CaptureConfiguration(
                #capture_mode=automation.TimedCaptureMode(duration_seconds=5.0)
            )
        else:
            capture_configuration = automation.CaptureConfiguration(
                capture_mode=automation.TimedCaptureMode(duration_seconds=capture_seconds)
            )

        cls.capture = cls.manager.start_capture(
                device_configuration=device_configuration,
                capture_configuration=capture_configuration)

        cls.capture.stop()

		########################################
		# Gets blocked below the second time: ##
		########################################
        analyzer1 = cls.capture.add_analyzer('1-Wire', label=f'test', settings={  
            '1-Wire': 0,
        })

        print("2")
        spi_analyzer = cls.capture.add_analyzer('SPI', label=f'WASKA', settings={
            'MISO': 0,
            'Clock': 1,
            'Enable': 2,
            'Bits per Transfer': '8 Bits per Transfer (Standard)'
        })

        capture_filepath = os.path.join(cls.output_path, 'example_capture.sal')
        cls.capture.save_capture(filepath=os.path.abspath(capture_filepath))

        cls.capture.remove_analyzer(analyzer1)
        cls.capture.remove_analyzer(spi_analyzer)

        cls.capture.close()
        cls.manager.close()

@albert.caba Sorry for the trouble with this. At first glance at your code block, I’m unsure of what could be causing the script to get blocked. To quickly debug and reproduce this issue on our end, can you send your .py script file?