Fix for parsing a GatewayResponse PDU

Project: 
Gurux.DLMS.Python

getDataFromBlock arg is the class instead of the attribute which eventually raises an error when getting len of it in the function.

diff --git a/Gurux.DLMS.python/gurux_dlms/GXDLMS.py b/Gurux.DLMS.python/gurux_dlms/GXDLMS.py
index 1ce6ec8..cd0b983 100644
--- a/Gurux.DLMS.python/gurux_dlms/GXDLMS.py
+++ b/Gurux.DLMS.python/gurux_dlms/GXDLMS.py
@@ -1671,7 +1671,7 @@ class GXDLMS:
len_ = _GXCommon.getObjectCount(data.data)
pda = bytearray(len_)
data.data.get(pda)
- cls.getDataFromBlock(data, index)
+ cls.getDataFromBlock(data.data, index)
data.command = (Command.NONE)
cls.getPdu(settings, data)
else:
--

Status: 
Closed (fixed)
Priority: 
Normal
Category: 
Bug report
Component: 
Code
Reporter: 
alyainfo
Created: 
Fri, 02/12/2021 - 00:01
Updated: 
Fri, 02/12/2021 - 08:46

Comments

Kurumi's picture

Hi,

Thank you for this info. This is now fixed and your name is added to credits. The new version is released today.

BR,
Mikko

Kurumi's picture

Status: Active » Closed (fixed)