Skip to content

Conversation

@MIDORIBIN
Copy link
Contributor

Fixed PermissionError that occurred when downloading PDF files via http in BasePDFLoader on windows.

When downloading PDF files via http in BasePDFLoader, NamedTemporaryFile is used.
This function cannot open the file again on Windows.Python Doc

So, we created a temporary directory with TemporaryDirectory and placed the downloaded file there.
temporary directory is deleted in the deconstruct.

Fixes #2698

Who can review?

Tag maintainers/contributors who might be interested:

@hwchase17 hwchase17 merged commit 5be465b into langchain-ai:master Jun 18, 2023
This was referenced Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permission Error with PDF loader

2 participants