-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Error uploading files on Windows #38
Comments
Experiencing the same thing. Running the terminal as admin doesn't change anything. |
I think I found it, not a security issue but a timing/async one possibly. In process_file (common.py) when the temporary file is created, it's deleted before the loader is done with it. Not sure if it's due to an error or an asynchronous loader but here's where it's happening. The call to loader.load() jumps directly back to the "with tempfile" part leaving the scope of the last call and deleting the temp file. Changing the True to False in line 19 of common.py "fixes" it.
|
* defer marking temp file for deletion closes #38 * manually delete file
* defer marking temp file for deletion closes QuivrHQ#38 * manually delete file
* defer marking temp file for deletion closes #38 * manually delete file
I got Quivr up and running, Windows 10, but am having issues when I try to upload a file. It seems it doesn't have permission to access the Temp folder? It should as far as I can tell.
PermissionError: [Errno 13] Permission denied: 'C:\Users\29158~1.1E1\AppData\Local\Temp\tmpl5t8vu99.txt'
Traceback:
File "C:\Users\Laptop\Documents\GitHub\quivr\venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "C:\Users\Laptop\Documents\GitHub\quivr\main.py", line 66, in
file_uploader(supabase, openai_api_key, vector_store)
File "C:\Users\Laptop\Documents\GitHub\quivr\files.py", line 37, in file_uploader
file_processors[file_extension](vector_store, file)
File "C:\Users\Laptop\Documents\GitHub\quivr\loaders\txt.py", line 5, in process_txt
return process_file(vector_store, file, TextLoader, ".txt")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Laptop\Documents\GitHub\quivr\loaders\common.py", line 19, in process_file
documents = loader.load()
^^^^^^^^^^^^^
File "C:\Users\Laptop\Documents\GitHub\quivr\venv\Lib\site-packages\langchain\document_loaders\text.py", line 17, in load
with open(self.file_path, encoding=self.encoding) as f:
The text was updated successfully, but these errors were encountered: