Hi I'm new here and want to ask you, why reading ProfileGeneric with method readRowsByRange is not working for Metcom MCS301?
Method readRowsByEntry is working ok.
I think it is in datetime formatting, because data comming from meter are like this:
11/24/24 02:00:00 | 743 | 62682
11/25/24 02:00:00 | 750 | 62976
11/25/24 02:00:00 | 750 | 62976
11/26/24 02:00:00 | 756 | 63983
11/26/24 02:00:00 | 756 | 63983
But when I try to format it like this, tyhis error appears:
python : Traceback (most recent call last):
At line:1 char:1
+ python main3.py ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Traceback (most recent call last)::String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
File "main3.py", line 95, in main
cells = reader.readRowsByRange(profile, dt_from, dt_to)
File "C:\Users\Administrator\Documents\Gurux.DLMS.Python\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 358, in readRowsByRange
data = self.client.readRowsByRange(pg, start, end)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 1381, in readRowsByRange
_GXCommon.setData(self.settings, buff, DataType.OCTET_STRING, start)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\internal\_GXCommon.py", line 1378, in setData
cls.setDateTime(settings, buff, value)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gurux_dlms\internal\_GXCommon.py", line 1560, in setDateTime
d = int(dt.value.utcoffset().seconds / 60)
AttributeError: 'NoneType' object has no attribute 'seconds'
Thx a lot.
Hi, You have given None…
Hi,
You have given None value to the start or end time. Check the client example:
https://github.com/Gurux/Gurux.DLMS.Python/blob/f0424203b37d6e64e5231d1…
BR,
Mikko
Hi, everything works fine…
Hi, everything works fine.
My mistake - switched start and end date.
Thanks for your answer.