I found why you are getting an index out of range error. It is because it expects a t value to be given, like so:
The t variable is how long to keep the zone on, and 0 means indefinitely. Basically, there are a few syntax differences that need to be addressed.
I have updated my code to issue a t=0 now which works fine on both versions (the RPi and the OS).
Let me know if this works better now!