-
Couldn't load subscription status.
- Fork 1.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When we use not real io file with name attribute partition_pdf failed with no such file or directory.
This can happen, for example, when you extract files from a zip file with ZipFile and open
To Reproduce
import io
# Create a 'fake' file
file = io.BytesIO()
file.name = 'tmp.pdf'
# Call the partition_pdf function
result = partition_pdf(file=file)Expected behavior
Same experience than spooltempfile with no attribute name
Screenshots
...
Environment Info
...
Additional context
- This issue occurs when using a file object with an assigned name.
- The bug can be reproduced when extracting a file from a ZIP archive, where the file has a name but does not exist in the filesystem.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working