Segment Violation Error in PyROOT

I guess you need:
chn0 = arr.array('l', [0]) # one "Int_t"
and then:
hist.Fill(chn0[0], ticks)

Please do read the links given in this post: