-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Versions
- Python: 3.5.2
- OS: ubuntu 16.04
- Pymodbus: 2.1.1-dev
- Modbus Hardware (if used):
Pymodbus Specific
- Server: tcp - sync/async
- Client: tcp - sync/async
Description
The update statement used wrong column name.
In "query = self._table.update().values(name='value')", "name" should be "value". Since there is no column called "name", this will result in failure in update operation.
Code and Logs
starting from line 153 in sql_datastore.py
def _update(self, type, offset, values):
'''
:param type: The type prefix to use
:param offset: The address offset to start at
:param values: The values to set
'''
context = self._build_set(type, offset, values, prefix='x_')
query = self._table.update().values(name='value')
query = query.where(and_(
self._table.c.type == bindparam('x_type'),
self._table.c.index == bindparam('x_index')))
result = self._connection.execute(query, context)
return result.rowcount == len(values)Reactions are currently unavailable