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

While executing "ingest.py" I am getting below error #752

Open
srikantak opened this issue Feb 19, 2024 · 4 comments
Open

While executing "ingest.py" I am getting below error #752

srikantak opened this issue Feb 19, 2024 · 4 comments

Comments

@srikantak
Copy link

I have setup Conda and all required dependencies. After that -

While executing "ingest.py" I am getting below error -

"

C:\Users\Pallavi\AppData\Roaming\Python\Python311\site-packages\langchain\vectorstores_init_.py:35: LangChainDeprecationWarning: Importing vector stores from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.vectorstores import Chroma.

To install langchain-community run pip install -U langchain-community.
warnings.warn(
Traceback (most recent call last):
File "c:\Srikanta\Technical\LGPT\ingest.py", line 10, in
from utils import get_embeddings
File "c:\Srikanta\Technical\LGPT\utils.py", line 4, in
from constants import EMBEDDING_MODEL_NAME
File "c:\Srikanta\Technical\LGPT\constants.py", line 7, in
from langchain.document_loaders import CSVLoader, PDFMinerLoader, TextLoader, UnstructuredExcelLoader, Docx2txtLoader
File "C:\Users\Pallavi\AppData\Roaming\Python\Python311\site-packages\langchain\document_loaders_init_.py", line 32, in getattr
from langchain_community import document_loaders
File "C:\Users\Pallavi\AppData\Roaming\Python\Python311\site-packages\langchain_community\document_loaders_init_.py", line 163, in
from langchain_community.document_loaders.pebblo import PebbloSafeLoader
File "C:\Users\Pallavi\AppData\Roaming\Python\Python311\site-packages\langchain_community\document_loaders\pebblo.py", line 5, in
import pwd
ModuleNotFoundError: No module named 'pwd'

"

@PromtEngineer
Copy link
Owner

Seems like the error is coming from langchain package. There was recently an update to langchain and seems to have broken the code. This might need updates to the code to support the new version of langchain.

@srikantak
Copy link
Author

Thank you sir for quick response.

May I request the working code of ingest.py. If you suggest I can download the entire project once more from github.

Regards,
Srikanta

@srikantak
Copy link
Author

Hello, would you be able to provide your version of langchain for me to update in my environment and review? Thank you.

@NitkarshChourasia
Copy link

@srikantak you can view the requirements.txt for the following.

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

No branches or pull requests

3 participants