Python print() method not work in my HLA

I’ve never used the terminal function before.
But when I started creating my own analyzer. I decided that it’s very useful to output debug information during code execution.
I found in the description how to do this using the print() method.
But unfortunately it doesn’t work for me and causes a runtime error. Even in the default template.
Here is a simple code snippet where I call print to terminal when the code is initialized.

  def __init__(self):
    '''
    Initialize HLA.

    Settings can be accessed using the same name used above.
    '''
    print("Test message")

The program returns an error:

Decoder KNX error - RuntimeError('unknown WriteFile error: 232; Error(232) The pipe is being closed.\r\n')

And in the window the error decoding:

File "D:\Program Files\Logic\resources\windows-x64\pythonlibs\lib\site-packages\saleae\analyzers\high_level_analyzer.py", line 25, in __call__
obj.__init__(*args, **kwargs)

File "D:\Program Files\Logic\resources\offlineExtensions\Decoder KNX\HighLevelAnalyzer.py", line 40, in __init__
print("Test message")

File "D:\Program Files\Logic\resources\windows-x64\pythonlibs\lib\site-packages\saleae\_module_space.py", line 270, in write
return current_space.write_stdout(message)

File "D:\Program Files\Logic\resources\windows-x64\pythonlibs\lib\site-packages\saleae\_module_space.py", line 196, in write_stdout
self._msg_callback(message)

Maybe I’m using a different version of Python on my computer and it conflicts with the Saleae Logic version?
I have Windows 7/x64 and Saleae Logic version 2.4.11

{
"Environment":"production",
"Branch":"master",
"Commit":"b8e9de2cc4694c0d1127f7e04504d65b2dedbcad",
"Version":"2.4.11",
"AutomationVersion":"1.0.0",
"MachineID":"d8a1a922-246b-4ff1-87cf-114ba7821eb2",
"PID":182576,
"LaunchId":"7c6375c0-520e-472d-b5b6-04f5bd65151d",
"Architecture":"x64"
}

изображение

Thank for your help.

@kv.albraun I haven’t tested this theory yet, but I think the issue is due to printing from within __init__(self). Can you try printing inside of decode()?

Example usage of the print() function can be found in the forum post below.

Hopefully that helps!

By the way, as a side note, we’ve implemented several bug fixes since 2.4.11 (we are currently on version 2.4.14 now). A list of the fixes/changes can be found below for reference.
https://ideas.saleae.com/f/changelog/

Thanks for the answer.
But the problem is not where the print() method is output from
Even in the standard template it is located there.

I moved this method to the decode function, but the result remains the same. Error.

Yes, I know that the latest version of the program is 2.4.14
But I remember that it didn’t run on Windows 7
изображение

and version 2.4.11 definitely worked.
By the way, in version 2.4.9 the print() method didn’t work for me either.
That’s why I rewrote the version to 2.4.11, hoping that it would work. But alas…

I tried installing this version of Logic 2.4.11 on my Windows 10 laptop. And lo and behold! The terminal works fine.
It looks like either the problem is in Windows 7, or some versions of Python on the computer conflict with the version inside Logic.
Any thoughts on this?

@kv.albraun Sorry my initial hunch didn’t help.

My guess is that Windows 7 is the cause of the issue. In particular, starting Logic 2.4.14, we no longer officially support Windows 8, and there are known issues with getting it running on that OS (with Windows 7 support being dropped several years before that as well).

Because of this, we don’t recommend using our Logic 2 software with Windows 7. Besides this error, there are likely others that you will run into due to us no longer developing/validating our software on Windows 7.

Yes, I understand the limitations associated with the version of Windows.
Saleae Logic version newer than version 2.4.11 does not start at all due to an incorrect DLL.
But even version 2.4.9 does not start the print() method
Thanks for the help, I will use a laptop with version Windows 10

What version of python do you use? I think python 3.8 was the last version officially supported on Win7. However, realize Microsoft is now pushing Win11, so being only one version behind should keep you better supported with newer releases & features.

Otherwise, you’ll need to figure out all program dependencies and check that Win7 is supported (base program, python, libraries, SDK(s), scripts, etc.)