There’s absolutely no reason why doing what Daniel said correctly should throw that error. My guess is that you used smart-quotes for Python rather than the raw " characters.
When your question is answered, remember to mark the post that solved it as the solution as a way to thank the answerer, guide others to the solution, and signal that no more help is needed.