Find answers from the community

Updated 2 months ago

But I'm not able to get it's original

But I'm not able to get it's original type again... to pass into the parser.


Plain Text
async def get_docs(self) -> List[Document]:
        """Get the parsed documents from llamaparse."""
        documents = []
        with tempfile.NamedTemporaryFile(delete=True) as temp:
            temp.write(base64.b64decode(self.b64))
            temp.flush()
            temp.seek(0)
            parser = LlamaParse(result_type=self.result_type)
            documents = await parser.aload_data(temp.name)

        return documents

Plain Text
Error while parsing the file '/var/folders/d1/p4s8h3q552xbvq30g272vdbh0000gn/T/tmpqgr4rzp3': Currently, only the following file types are supported: ['.pdf', '.doc', '.docx', '.docm', '.dot', '.dotx', '.dotm', '.rtf', '.wps', '.wpd', '.sxw', '.stw', '.sxg', '.pages', '.mw', '.mcw', '.uot', '.uof', '.uos', '.uop', '.ppt', '.pptx', '.pot', '.pptm', '.potx', '.potm', '.key', '.odp', '.odg', '.otp', '.fopd', '.sxi', '.sti', '.epub', '.html', '.htm']
`
L
A
3 comments
Add a reply
Sign up and join the conversation on Discord