system.tag.queryTagHistory return None, aggregationMode Max

Ignition 7.7.6 (b2015120217)

I need to obtain from history the maximum value from a list of tag Path.
I use system.tag.queryTagHistory with aggregationMode = Maximum, but I obtain a None value.

import datetime
startTime = - datetime.timedelta(minutes=600)
endTime =
dataSet = system.tag.queryTagHistory(paths=paths, startDate=startTime, endDate=endTime, returnSize=1, aggregationMode=“Maximum”, returnFormat=‘Wide’,ignoreBadQuality=1, noInterpolation=1,validateSCExec=0)

These tag are stored with one value every hours.

Any Idea ? :scratch:

First thing I notice is you don’t have paths defined.
It should be
Then you can just use the Query for Maximum feature to get what you want since it looks like you are just calculating Now() - 600 minutes.

import datetime
dataSet = system.tag.queryTagHistory([paths],returnSize=1,aggregationMode='Maximum',rangeMinutes='-600')