Find answers from the community

Updated 2 months ago

I am getting this error while using MarkDownElementNodeParser , how to fix it ? 232 try

I am getting this error while using MarkDownElementNodeParser , how to fix it ?

232 try:
233 if self.low_memory:
--> 234 chunks = self._reader.read_low_memory(nrows)
235 # destructive to chunks
236 data = _concatenate_chunks(chunks)

File parsers.pyx:838, in pandas._libs.parsers.TextReader.read_low_memory()

File parsers.pyx:905, in pandas._libs.parsers.TextReader._read_rows()

File parsers.pyx:874, in pandas._libs.parsers.TextReader._tokenize_rows()

File parsers.pyx:891, in pandas._libs.parsers.TextReader._check_tokenize_status()

File parsers.pyx:2061, in pandas._libs.parsers.raise_parser_error()

ParserError: Error tokenizing data. C error: EOF inside string starting at row 5
k
A
4 comments
Please stand by @Ansuman Satapathy as I search the knowledge base. I normally take about 20 seconds or so. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The error you're encountering seems to be related to pandas' file parsing, not directly related to the MarkdownElementNodeParser from LlamaIndex. It might be due to a malformed file you're trying to read.

However, I can guide you on how to use MarkdownElementNodeParser based on the information I have. The MarkdownElementNodeParser in LlamaIndex is used to split a markdown document into Text Nodes and Index Nodes corresponding to embedded objects like tables. Here's an example of how to use it:

Plain Text
from llama_index.core.node_parser import MarkdownNodeParser

parser = MarkdownNodeParser()

nodes = parser.get_nodes_from_documents(markdown_docs)

(Source: LlamaIndex Documentation ())

For more specific help with your error, you might want to check the pandas documentation or relevant StackOverflow threads.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
@kapa.ai parser.get_nodes_from_documents(markdown_docs) is giving me the error details posted earlier
The error was in markdown parsing
Add a reply
Sign up and join the conversation on Discord