diff --git a/dsmr_parser/clients/protocol.py b/dsmr_parser/clients/protocol.py index 560c0aa..56ed26d 100644 --- a/dsmr_parser/clients/protocol.py +++ b/dsmr_parser/clients/protocol.py @@ -116,7 +116,7 @@ class DSMRProtocol(asyncio.Protocol): def data_received(self, data): """Add incoming data to buffer.""" - data = data.decode("ascii") + data = data.decode("ascii", errors="ignore") self._active = True self.log.debug("received data: %s", data) self.telegram_buffer.append(data) diff --git a/setup.py b/setup.py index 7ad7c68..3852064 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( author_email='nigel@nldr.net', license='MIT', url='https://github.com/ndokter/dsmr_parser', - version='0.30', + version='0.31', packages=find_packages(exclude=('test', 'test.*')), install_requires=[ 'pyserial>=3,<4',