krishnaik06 / Complete-Langchain-Tutorials

GNU General Public License v2.0
351 stars 289 forks source link

chatmultipledocuments/chatpdf1.py - Got Value Error ValueError: The de-serialization relies loading a pickle file. Pickle files can be modified to deliver a malicious payload that results in execution of arbitrary code on your machine.You will need to set `allow_dangerous_deserialization` to `True` to enable deserialization. If you do this, make sure that you trust the source of the data. For example, if you are loading a file that you created, and no that no one else has modified the file, then this is safe to do. Do not set this to `True` if you are loading a file from an untrusted source (e.g., some random site on the internet.). #14

Open MannePradeepKumar opened 6 months ago

MannePradeepKumar commented 6 months ago

Screenshot 2024-04-15 130713

ValueError: The de-serialization relies loading a pickle file. Pickle files can be modified to deliver a malicious payload that results in execution of arbitrary code on your machine.You will need to set allow_dangerous_deserialization to True to enable deserialization. If you do this, make sure that you trust the source of the data. For example, if you are loading a file that you created, and no that no one else has modified the file, then this is safe to do. Do not set this to True if you are loading a file from an untrusted source (e.g., some random site on the internet.). Traceback: File "C:\Users\pmanne\Downloads\Gemini\gemini\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script exec(code, module.dict) File "C:\Users\pmanne\Downloads\Gemini\geminipdfchatbot.py", line 107, in main() File "C:\Users\pmanne\Downloads\Gemini\geminipdfchatbot.py", line 92, in main user_input(user_question) File "C:\Users\pmanne\Downloads\Gemini\geminipdfchatbot.py", line 69, in user_input new_db = FAISS.load_local("faiss_index", embeddings) File "C:\Users\pmanne\Downloads\Gemini\gemini\lib\site-packages\langchain_community\vectorstores\faiss.py", line 1078, in load_local raise ValueError(

MannePradeepKumar commented 6 months ago

can anyone help me on this?

PooravBolar commented 5 months ago

Even i got this.

OrientAbbey commented 5 months ago

Change new_db = FAISS.load_local("faiss_index", embeddings) To new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)

PooravBolar commented 5 months ago

Yes, Thank you!!

On Sun, May 26, 2024 at 12:44 AM ORIENT FRANCIS JAMES ABBEY ABBEY < @.***> wrote:

Change new_db = FAISS.load_local("faiss_index", embeddings) To new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)

— Reply to this email directly, view it on GitHub https://github.com/krishnaik06/Complete-Langchain-Tutorials/issues/14#issuecomment-2131405719, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIKHDQHAVFD66XCSUQMADHTZEDPLFAVCNFSM6AAAAABGGZMPWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZRGQYDKNZRHE . You are receiving this because you commented.Message ID: @.***>