Skip to content

Llamparse within SimpledirectoryReader doesn't accept PurePosixPath #421

Closed
@seeifsalem

Description

@seeifsalem

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)):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions