Find answers from the community

Updated 2 years ago

This is my code

This is my code
from pathlib import Path
from llama_index import download_loader

file_path=Path('/mnt/hub/data/***.pptx')
PptxReader = download_loader("PptxReader")

loader = PptxReader()
documents = loader.load_data(file=file_path)
print(documents)



ERROR
Traceback (most recent call last):
File "/mnt/hub/text/pptReader.py", line 5, in <module>
PptxReader = download_loader("PptxReader")
File "/root/miniconda3/envs/hub/lib/python3.8/site-packages/llama_index/readers/download.py", line 216, in download_loader
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 839, in exec_module
File "<frozen importlib._bootstrap_external>", line 976, in get_code
File "<frozen importlib._bootstrap_external>", line 906, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/miniconda3/envs/hub/lib/python3.8/site-packages/llama_index/readers/llamahub_modules/file/pptx/base.py", line 1
404: Not Found
^
SyntaxError: invalid syntax

May I ask what is the situation
L
t
2 comments
There was some recent changes to download_loader

Llama-Hub is now a pip package. So you can either update llama-index (since the URL changed for downloading) or you can install llama-hub and use it directly
Ok, I understand, thanks
Add a reply
Sign up and join the conversation on Discord