Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed PermissionError on windows #6170

Merged
merged 1 commit into from
Jun 18, 2023

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