Your code works, I will not comment on that. There are other comments that already suggest improvements.
Regarding the error message, this is related to the encoding of your file. I was able to reproduce the error by saving the .csv file, opening it in NotePad, and save it again using the UTF-8 BOM format while the format originally was ANSI.
I suspect that you opened your saved file to check its content and while doing so the format changed.