diff --git a/dsmr_parser/clients/serial_.py b/dsmr_parser/clients/serial_.py index c252f6f..319becc 100644 --- a/dsmr_parser/clients/serial_.py +++ b/dsmr_parser/clients/serial_.py @@ -55,7 +55,7 @@ class SerialReader(object): for telegram in self.telegram_buffer.get_all(): try: - yield Telegram(telegram, telegram_parser, telegram_specification) + yield Telegram(telegram, self.telegram_parser, self.telegram_specification) except InvalidChecksumError as e: logger.warning(str(e)) except ParseError as e: diff --git a/test/experiment_telegram.py b/test/experiment_telegram.py index 3450a05..2649f51 100644 --- a/test/experiment_telegram.py +++ b/test/experiment_telegram.py @@ -7,7 +7,7 @@ from dsmr_parser import telegram_specifications from dsmr_parser.exceptions import InvalidChecksumError, ParseError from dsmr_parser.objects import CosemObject, MBusObject, Telegram from dsmr_parser.parsers import TelegramParser -from test.example_telegrams import TELEGRAM_V4_2 +from example_telegrams import TELEGRAM_V4_2 parser = TelegramParser(telegram_specifications.V4) telegram = Telegram(TELEGRAM_V4_2, parser, telegram_specifications.V4)