L4-QnA.ipnnb encoding error on Window

Downloaded this file and testing it on windows. Got encoding error:

UnicodeDecodeError: ‘charmap’ codec can’t decode byte

From code:
index = VectorstoreIndexCreator(
vectorstore_cls=DocArrayInMemorySearch
).from_loaders([loader])

To make it work, I needed to change this line of code from
loader = CSVLoader(file_path=file)
TO
loader = CSVLoader(file_path=file, encoding=“utf8”)

3 Likes

Thanks for your report.

Thank you. I had the same issue. your soln worked.