I've never been able to get it to work. What I do instead is make a Function object that calls CreateObjectByName and then call the function from Python.
Develop games in your browser. Powerful, performant & highly capable.