thingsboard-python-client-sdk icon indicating copy to clipboard operation
thingsboard-python-client-sdk copied to clipboard

Modbus connection |ERROR| - [tb_gateway_service.py] - tb_gateway_service - _connect_with_connectors - 547 - 'str' object has no attribute 'get'"

Open jitendraspatil opened this issue 3 years ago • 0 comments

""2022-07-09 11:08:23" - |INFO| - [tb_gateway_service.py] - tb_gateway_service - init - 112 - Gateway starting..."

""2022-07-09 11:08:23" - |INFO| - [tb_gateway_service.py] - tb_gateway_service - init - 117 - ThingsBoard IoT gateway version: 3.1"

""2022-07-09 11:08:23" - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_subscribe_to_attribute - 175 - Subscribed to | with id 1 for device *"

""2022-07-09 11:08:23" - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import ModbusConnector from /usr/local/lib/python3.9/site-packages/thingsboard_gateway-3.1-py3.9.egg/thingsboard_gateway/connectors/modbus."

""2022-07-09 11:08:23" - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - _load_connectors - 502 - Cannot parse connector configuration as a JSON, it will be passed as a string."

""2022-07-09 11:08:23" - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - _connect_with_connectors - 547 - 'str' object has no attribute 'get'"

Traceback (most recent call last):

File "/usr/local/lib/python3.9/site-packages/thingsboard_gateway-3.1-py3.9.egg/thingsboard_gateway/gateway/tb_gateway_service.py", line 535, in _connect_with_connectors

connector = self._implemented_connectors[connector_type](self,

File "/usr/local/lib/python3.9/site-packages/thingsboard_gateway-3.1-py3.9.egg/thingsboard_gateway/connectors/modbus/modbus_connector.py", line 98, in init

self.__config = self.__backward_compatibility_adapter.convert()

File "/usr/local/lib/python3.9/site-packages/thingsboard_gateway-3.1-py3.9.egg/thingsboard_gateway/connectors/modbus/backward_compability_adapter.py", line 40, in convert

if not self.__config.get('server'):

AttributeError: 'str' object has no attribute 'get'

""2022-07-09 11:08:23" - |INFO| - [tb_gateway_service.py] - tb_gateway_service - init - 214 - Gateway started."

""2022-07-09 11:08:23" - |INFO| - [tb_device_mqtt.py] - tb_device_mqtt - _on_connect - 139 - connection SUCCESS"

""2022-07-09 11:08:23" - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_subscribe_to_attribute - 175 - Subscribed to | with id 2 for device *"

jitendraspatil avatar Jul 09 '22 12:07 jitendraspatil