Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Llamparse within SimpledirectoryReader doesn't accept PurePosixPath #421

Open
seeifsalem opened this issue Oct 1, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@seeifsalem
Copy link

Describe the bug
I am using LlamaParse as an extractor within a SimpleDirectoryReader with fs as an s3 bucket. What will happen is that when load_data() from LlamaParse is called, the file_path will be a PurePosixPath (because of the design of SimpleDirectoryReader).
_Path = Path if is_default_fs(self.fs) else PurePosixPath

The problem is that in llama_parse\base.py line 367 we have this check
if isinstance(file_path, (str, Path, bytes, BufferedIOBase)):
It doesn't include PurePosixPath as an accepted instance so we can't load our files.

This should be an easy fix:
if isinstance(file_path, (str, Path, PurePosixPath, bytes, BufferedIOBase)):

@seeifsalem seeifsalem added the bug Something isn't working label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant