Johannes Sikstrom Posted November 27, 2023 Posted November 27, 2023 (edited) Hi, I'm having issues pulling raw samples without the default grid. First I create a calculation one one truck. I search for one truck, and do a calculation push() truck1034_signals = spy.search({ "Path": "path >> to >> truck >> G52_TRC1034" }) Payload_resamp_calc = spy.push(metadata=pd.DataFrame([{ 'Type': 'Signal', 'Name': 'Payload Resamp', 'Formula': "$p.resample($c.toNumber()).remove($l2.isNotEqualTo('KR_KID2'))", 'Formula Parameters': { '$c': truck1034_signals[truck1034_signals['Name'] == 'CycleID'], '$p': truck1034_signals[truck1034_signals['Name'] == 'Payload'], '$l2': truck1034_signals[truck1034_signals['Name'] == 'LoadDestination'], } }]), workbook='SPy Documentation Examples >> spy.pull') Then i search for more trucks, in this case just 6 trucks for testing. (In reality its like 60 trucks i want to get.) #this finds 6 trucks truck_assets = spy.search({ "Name": "G52_TRC103", "Path": "path >> to >> truck >> Hauling" }) start=pd.Timestamp("2023-11-17 01:45", tz='CET') end=pd.Timestamp("2023-11-17 03:15", tz='CET') df = spy.pull(truck_assets,start=start, end=end, calculation=Payload_resamp_calc,header='Name') df.head() Running this with default grid works and gives this result: However, i want raw samples, not default grid of 15 min. When I ad the grid=None option to the pull i get this error: df = spy.pull(truck_assets,start=start, end=end, calculation=Payload_resamp_calc,header='Name',grid=None) SPy Error: Pull cannot include conditions when no signals are present with shape='samples' and grid=None Why is it not working without the grid? I tried even for just one truck and still it does not work with the grid=None. Is it due to the calculation in some way? Edited November 27, 2023 by Johannes Sikstrom
Seeq Team Mark Derbecker Posted November 27, 2023 Seeq Team Posted November 27, 2023 @Johannes Sikstrom I think this is a bug in the SPy framework. It's not yet obvious what the problem is by looking at your code, I think I will need to see it in action. I will log a support ticket on your behalf and follow up with you there. 1
Solution Johannes Sikstrom Posted December 11, 2023 Author Solution Posted December 11, 2023 (edited) Just for posterity: Seeq/Mark identified this as a bug. I was given a temporary work around and the bug will be addressed in future version. The method in the first post was basically correct. "This Development Request has been addressed in future Seeq version(s): 64.0.0, 59.3.5, 61.1.12, 60.3.7, 58.8.7, 63.0.5, 62.0.13" Edited December 11, 2023 by Johannes Sikstrom 1
Seeq Team Mark Derbecker Posted December 11, 2023 Seeq Team Posted December 11, 2023 Yes-- this bug is addressed in SPy v190.5, which will be released to PyPI by the end 2023. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now