Python Method Chaining Javascript Console Log Not Working