Did you ever figure it out? I’m having the same issue Python script works in terminal, but fails in command line sensor