Skip to content

Conversation

@chandlerwr
Copy link
Contributor

In the constructor for ModbusSerialServer, the call to super().__init__ flipped the "request_tracer" and "response_manipulator" parameters. Passing a request_tracer as normal resulted in a "cannot unpack non-iterable NoneType object" error when a request was recieved.

To reproduce the same bug, replace the TCP server with a serial server in the server_hook.py example.

Fixed by reversing the two parameters in the function call. Also added labels to try and prevent further ordering issues if parameters are changed in the future.

Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@janiversen janiversen merged commit 1c96d93 into pymodbus-dev:dev Oct 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants