parser = LlamaParse( api_key=[redacted], result_type="markdown" ) file_extractor = {".pdf": parser} reader = SimpleDirectoryReader("./data", file_extractor=file_extractor) documents = reader.load_data()
ImportError Traceback (most recent call last) File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\llama_index\core\readers\file\base.py:22, in _try_loading_included_file_formats() 21 try: ---> 22 from llama_index.readers.file import ( 23 DocxReader, 24 EpubReader, 25 HWPReader, 26 ImageReader, 27 IPYNBReader, 28 MarkdownReader, 29 MboxReader, 30 PandasCSVReader, 31 PDFReader, 32 PptxReader, 33 VideoAudioReader, 34 ) # pants: no-infer-dep 35 except ImportError: ImportError: cannot import name 'DocxReader' from 'llama_index.readers.file' (unknown location)
llama_index/CORE/readers/file
it is trying to import form llama_index.readers.file
, whilst I'm 99% sure that llama_index.readers
doesn't even exist anymore, as it is now llama_index.core.readers
readers/file
import is clearly nested in the core
namespace.Name: llama-index Version: 0.10.13.post1 Summary: Interface between LLMs and your data Home-page: https://llamaindex.ai Author: Jerry Liu Author-email: jerry@llamaindex.ai License: MIT Location: C:\Users\Niek\AppData\Local\Programs\Python\Python311\Lib\site-packages Requires: llama-index-agent-openai, llama-index-cli, llama-index-core, llama-index-embeddings-openai, llama-index-indices-managed-llama-cloud, llama-index-legacy, llama-index-llms-openai, llama-index-multi-modal-llms-openai, llama-index-program-openai, llama-index-question-gen-openai, llama-index-readers-file, llama-index-readers-llama-parse Required-by:
from llama_index.core.readers import SimpleDirectoryReader from llama_index.core.storage.docstore import SimpleDocumentStore from llama_index.core.node_parser import SimpleNodeParser from llama_parse import LlamaParse import os import nest_asyncio
ImportError: cannot import name 'StorageContext' from partially initialized module 'llama_index.core.storage.sto StorageContextrage_context' (most likely due to a circular import)
llamaindex.core
and not llamaindex.core.readers
?