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
@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/
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?
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.)