The python library's turn method is returning an error screenshotted below. The equivalent lua command is working properly.
rschulman commented
This was actually my mistake. I was constructing the r object incorrectly, based on misreading the docs (and mistranslating from lua to python). Its working now that I've done it correctly. Closing this.