Find answers from the community

Home
Members
brianjack
b
brianjack
Offline, last seen 2 days ago
Joined November 19, 2024
I have a slight problem trying to process a document in AWS s3, I am able to upload it but the s3 reader is unable to work with the file am sending it. Am getting an error
Plain Text
Failed to load file ncl-staging/organizations/c28bd98c-5a1c-4bad-94be-718be1a32ec9/documents/knowledge.pdf with error: The input file_path must be a string or a list of strings.. Skipping...

I tried setting up a local environment and tested it out and it worked but for some reason it fails in production.
Here is the code
Plain Text
 # Process document
            loader = S3Reader(
                bucket=bucket_name,
                key=object_key,
                aws_access_id=settings.AWS_ACCESS_KEY_ID,
                aws_access_secret=settings.AWS_SECRET_ACCESS_KEY,
                s3_endpoint_url=get_s3_endpoint(settings.AWS_REGION),
                file_extractor=self.file_extractors,
            )
            llama_documents = await loader.aload_data()

            if not llama_documents:
                raise ValueError("No documents were processed from the input file")
6 comments
W
b