Note, changing the port from '32' to 32 does not solve the problem either. Some type checking/casting should be added.
Args: ['--instance-id', 'wg-tilt-sensor', '--site-hub', 'ws://127.0.0.1:8003/ws', '--site-http', 'http://127.0.0.1:8003/call']
Installed OCS Plugins: ['socs', 'ocs']
Renaming this process to: "ocs-agent:wg-tilt-sensor"
Traceback (most recent call last):
File "/usr/local/bin/ocs-agent-cli", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/ocs/agent_cli.py", line 208, in main
start(args=post_args)
File "/usr/local/lib/python3.8/dist-packages/socs/agents/wiregrid_tiltsensor/agent.py", line 203, in main
tiltsensor_agent = WiregridTiltSensorAgent(agent,
File "/usr/local/lib/python3.8/dist-packages/socs/agents/wiregrid_tiltsensor/agent.py", line 36, in __init__
self.tiltsensor = connect(self.ip, self.port, self.sensor_type)
File "/usr/local/lib/python3.8/dist-packages/socs/agents/wiregrid_tiltsensor/drivers/__init__.py", line 9, in connect
tiltsensor = DWL(tcp_ip=ip, tcp_port=port, timeout=0.5, isSingle=False, verbose=0)
File "/usr/local/lib/python3.8/dist-packages/socs/agents/wiregrid_tiltsensor/drivers/dwl.py", line 25, in __init__
msg = self.__conn(tcp_ip, tcp_port, timeout)
File "/usr/local/lib/python3.8/dist-packages/socs/agents/wiregrid_tiltsensor/drivers/dwl.py", line 129, in __conn
self.ser = mx.Serial_TCPServer((tcp_ip, tcp_port), timeout)
File "/usr/local/lib/python3.8/dist-packages/socs/common/moxa_serial.py", line 64, in __init__
self.sock.connect(self.port)
TypeError: an integer is required (got type str)
Disconnecting from TCP IP 10.10.10.10 at port 32
Exception ignored in: <function DWL.__del__ at 0x7f7068afd280>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/socs/agents/wiregrid_tiltsensor/drivers/dwl.py", line 30, in __del__
self.ser.close()
AttributeError: 'DWL' object has no attribute 'ser'
When starting up the
WireGridTiltSensor
agent with the following example options we get a connection error due to a type mismatch:Note, changing the port from
'32'
to32
does not solve the problem either. Some type checking/casting should be added.