Find answers from the community

Updated 2 months ago

PyMuPDF

Hi, all I am trying to use PyMuPDFReader but while loading it i am getting this error,

File c:\Users\omkar\miniconda3\envs\indexllama\Lib\site-packages\llama_index\readers\llamahub_modules/file/pymu_pdf/base.py:6
3 from typing import Dict, List, Optional, Union
5 from llama_index.readers.base import BaseReader
----> 6 from llama_index.readers.schema.base import Document
9 class PyMuPDFReader(BaseReader):
10 """Read PDF files using PyMuPDF library."""

ModuleNotFoundError: No module named 'llama_index.readers.schema'
L
J
6 comments
What version of llama_index fo you have? This folder/module definitely exists in the codebase πŸ€”
Name: llama-index
Version: 0.7.9
Summary: Interface between LLMs and your data
Home-page: https://github.com/jerryjliu/llama_index
Author: Jerry Liu
Author-email:
License: MIT
Location: C:\Users\omkar\miniconda3\envs\indexllama\Lib\site-packages
Editable project location: D:\Docker\IndexLllama\llama_index
Requires: beautifulsoup4, dataclasses-json, fsspec, langchain, nest-asyncio, numpy, openai, pandas, sqlalchemy, tenacity, tiktoken, typing-extensions, typing-inspect, urllib3
Required-by: llama-hub
I tried building it from source as well for llama-index, also tried installling llama-hub serpartely and then download the PyMuPDF using this

from pathlib import Path
from llama_index import download_loader

PyMuPDFReader = download_loader("PyMuPDFReader")

loader = PyMuPDFReader()
documents = loader.load(file_path=Path('./article.pdf'), metadata=True)

link - https://llamahub.ai/l/file-pymu_pdf
And none of that worked? The error didn't change? πŸ˜… If so that would be extremely weird, since that path definitely exists in the code
Ya πŸ˜…, trying on a different system now , just to be sure that’s it’s not a system specific issue
It worked on a different system. πŸ‘
Add a reply
Sign up and join the conversation on Discord