Some other people who are experiencing this error may want to check the file to see if it contains a header on the first line. While it wasn't the problem in your case, it is worth noting the way to work around it:
COPY my_table FROM 'c:\downloads\file.csv' WITH DELIMITER ',' CSV HEADER;