I think the problem here might be this: When you serve a recipe from the command line, Prodigy applies various converter functions to the command-line inputs (like, make sure integers are integers and convert comma-separated strings of labels to a list). If you're running it all from Python, that's not happening or necessary, because Python lets you pass in integers, lists etc.
So try passing in a list of labels instead of just the path to the labels file.