These are chat archives for juttle/juttle

27th
Jan 2016
David Cook
@davidbcook
Jan 27 2016 17:43

Hey team, the following program

read file -file 'Empatica Juttle Files/juttle-E4_LA.txt' -timeField 'epoch' -to :2016-01-26T21:13:00.969:
| filter accel_rms != null
| (
   reduce -every :1s: avg_rms = avg(accel_rms)
   ;
   reduce -every :1s: -over :5s: avg_rms_five_sec = avg(accel_rms)
   ;
   reduce -every :1s: max_rms = max(accel_rms)
) | join
| (
   filter avg_rms > 1.55
   | put name = 'avg rms over 1.55'
   | keep name, time
   //| view table
   | view events -on 'la_rms' -nameField 'name'
   ;
   split
   | view timechart -keyField 'name' -valueField 'value' -display.dataDensity 0 -title 'Left Arm Average RMS' -id 'la_rms'
)

gives me 2 errors:
Uncaught error and Uncaught SyntaxError: Unexpected end of input neither error points to a line in the juttle code. If I comment out the events sink and uncomment the table sink, the program runs just fine.

Rodney Lopes Gomes
@rlgomes
Jan 27 2016 17:45
unexpected end of input feels like it would be from the read filecan I see the last line ? tail -1 Empatica....
David Cook
@davidbcook
Jan 27 2016 17:46
I can't share the raw data :( but since the errors go away when I replace the events sink with a table, it feels like the issue is with events
Rodney Lopes Gomes
@rlgomes
Jan 27 2016 17:47
@go-oleg does the events have such an error message ? (its odd that changing sink has any change in behaviour)
Daria Mehra
@dmehra
Jan 27 2016 17:47
are you running the program in outrigger? is there any more detail on the error if you look in the network tab of chrome dev tools?
Rodney Lopes Gomes
@rlgomes
Jan 27 2016 17:47
@davidbcook see if the last line seems broken in terms of a JSON object ?
or not last line but the last json object in that file
David Cook
@davidbcook
Jan 27 2016 17:48
I am running it in outrigger. Oddly, the error information doesn't appear in the network tab as it often does for other errors.
Daria Mehra
@dmehra
Jan 27 2016 17:48
(you’re still running a release that doesn’t have proper error surfacing in the browser, so i have to direct you to snoop in the network tab)
Oleg Seletsky
@go-oleg
Jan 27 2016 17:48
we have better errors for view param validation coming soon, but my guess is your issue is that the events view comes before the the timechart view and it can’t find the timechart you are overlaying on at the time its created
David Cook
@davidbcook
Jan 27 2016 17:49
orly? that was never an issue in old juttle land, right?
Oleg Seletsky
@go-oleg
Jan 27 2016 17:50
i am pretty sure it was
Daria Mehra
@dmehra
Jan 27 2016 17:50
i cannot say… i never tried putting the dependent view before the main view
David Cook
@davidbcook
Jan 27 2016 17:50
ding ding ding! we have a winner!
Daria Mehra
@dmehra
Jan 27 2016 17:50
@go-oleg let’s make sure we get a better error for that case
David Cook
@davidbcook
Jan 27 2016 17:53
I switched the order of the sinks, and the program worked. I don't remember the order in which sinks occurred ever being a problem with old juttle. In fact there was no way to guarantee when certain parts of a program would be evaluated.
Thanks for helping me figure this out!