When I was trying to read csv files in Python, I came across the
When I went up to the beginning of the error message, I saw a
.DS_Store file and quickly realized the culprit. There was a hidden
.DS_Store file in the data directory and Python could not parse it, therefore throwing the above-mentioned error.
In order to see all the files in my directory, I used
ls -la, and there it was:
When I removed it, problem solved!
#first go to the directory where .DS_Store file is located, and then: find . -name '.DS_Store' -type f -delete