Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug/modbus_constructor #657

Merged
merged 2 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/test/base/python/src/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os
import util
from datetime import datetime
import traceback

LOGGER = None
RESULTS_DIR = '/runtime/output/'
Expand Down Expand Up @@ -113,6 +114,7 @@ def run_tests(self):
except Exception as e: # pylint: disable=W0718
LOGGER.error(f'An error occurred whilst running {test["name"]}')
LOGGER.error(e)
traceback.print_exc()
else:
LOGGER.info(f'Test {test["name"]} not implemented. Skipping')
test['result'] = 'Error'
Expand Down
8 changes: 4 additions & 4 deletions modules/test/protocol/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Required for BACnet protocol tests
netifaces
BAC0
pytz
netifaces==0.11.0
BAC0==23.7.3
pytz==2024.1

# Required for Modbus protocol tests
pymodbus
pymodbus==3.7.0
2 changes: 1 addition & 1 deletion modules/test/protocol/python/src/protocol_modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self, log, device_ip, config):
self._discrete_input_enabled = False

# Initialize the modbus client
self.client = ModbusClient(device_ip, self._port)
self.client = ModbusClient(host=device_ip, port=self._port)

# Connections created from this method are simple socket connections
# and aren't indicative of valid modbus
Expand Down
Loading