run-llama / llama_parse

Parse files for optimal RAG
https://www.llamaindex.ai
MIT License
1.79k stars 157 forks source link

ImportError: cannot import name 'DocxReader' from 'llama_index.readers.file' (unknown location) #224

Open Dantemerlino opened 3 weeks ago

Dantemerlino commented 3 weeks ago

Uncomment if you are in a Jupyter Notebook

import nest_asyncio nest_asyncio.apply()

from llama_parse import LlamaParse # pip install llama-parse from llama_index.core import SimpleDirectoryReader # pip install llama-index

parser = LlamaParse( api_key=LLAMA_CLOUD_API_KEY, # can also be set in your env as LLAMA_CLOUD_API_KEY result_type="markdown" # "markdown" and "text" are available )

file_extractor = {".pdf": parser} reader = SimpleDirectoryReader("/path/to/directory", file_extractor=file_extractor) documents = reader.load_data() --

this creates the error ImportError: cannot import name 'DocxReader' from 'llama_index.readers.file' (unknown location)