Trying to run above notebook cell 5. Have installed docarray and restarted kernel.
index = VectorstoreIndexCreator(
vectorstore_cls=DocArrayInMemorySearch
).from_loaders([loader])
Getting following error:
UnicodeDecodeError Traceback (most recent call last)
Cell In[5], line 3
1 index = VectorstoreIndexCreator(
2 vectorstore_cls=DocArrayInMemorySearch
----> 3 ).from_loaders([loader])
File ~\anaconda3\envs\openai\Lib\site-packages\langchain\indexes\vectorstore.py:81, in VectorstoreIndexCreator.from_loaders(self, loaders)
79 docs =
80 for loader in loaders:
—> 81 docs.extend(loader.load())
82 return self.from_documents(docs)
File ~\anaconda3\envs\openai\Lib\site-packages\langchain\document_loaders\csv_loader.py:61, in CSVLoader.load(self)
59 with open(self.file_path, newline=“”, encoding=self.encoding) as csvfile:
60 csv_reader = csv.DictReader(csvfile, **self.csv_args) # type: ignore
—> 61 for i, row in enumerate(csv_reader):
62 content = “\n”.join(f"{k.strip()}: {v.strip()}" for k, v in row.items())
63 try:
File ~\anaconda3\envs\openai\Lib\csv.py:111, in DictReader.next(self)
108 if self.line_num == 0:
109 # Used only for its side effect.
110 self.fieldnames
→ 111 row = next(self.reader)
112 self.line_num = self.reader.line_num
114 # unlike the basic reader, we prefer not to return blanks,
115 # because we will typically wind up with a dict full of None
116 # values
File ~\anaconda3\envs\openai\Lib\encodings\cp1252.py:23, in IncrementalDecoder.decode(self, input, final)
22 def decode(self, input, final=False):
—> 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x9d in position 4445: character maps to
Please help