Hello,
I'm trying to communicate with a device using CoolTerm through a python script but I keep receiving the following error:
x@y CoolTerm % /Users/x/anaconda3/bin/python /Users/x/Documents/CoolTerm/Scripting/Python/Examples/Test_Thermode.py
ERROR: Could not connect to CoolTerm
Traceback (most recent call last):
File "/Users/x/Documents/CoolTerm/Scripting/Python/Examples/Test_Thermode.py", line 5, in <module>
count = s.WindowCount()
^^^^^^^^^^^^^^^
File "/Users/x/Documents/CoolTerm/Scripting/Python/Examples/CoolTerm.py", line 217, in WindowCount
return self.GetWindowCount()
^^^^^^^^^^^^^^^^^^^^^
File "/Users/x/Documents/CoolTerm/Scripting/Python/Examples/CoolTerm.py", line 210, in GetWindowCount
Response = self._SendPacket(Packet)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/x/Documents/CoolTerm/Scripting/Python/Examples/CoolTerm.py", line 122, in _SendPacket
self.skt.sendall(Packet)
BrokenPipeError: [Errno 32] Broken pipe
I saw the other post where you recommended to enable remote socket control in the preferences, but that did not solve my problem. I'm using macOS ventura 13.0.1, python 3.11.5, CoolTerm v2.0.1.3.4.1150
Thanks !
Could not connect to CoolTerm
- roger
- Site Admin
- Posts: 439
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: Could not connect to CoolTerm
The "ERROR: Could not connect to CoolTerm" indicates that the "s = CoolTerm.CoolTermSocket()" command failed because CoolTerm is either not running or accepting connections. It is important that "Enable Remote Control Socket" is enabled in the preferences, and that the port is set to "51413" since that is the port the CoolTerm.py will attempt to connect to.