Have you double checked that both quotes are double quotes on that line?
If I type the script you have posted and run it, it works with no error. However, if I change a quote from a double " to a single ', I then get the exact error at the exact place you are getting.