1

I can not import ApifyWrapper from langchain.utilities. I need to import it to make web scrapping from a web site for a school project.

I got this error:

**

ImportError Traceback (most recent call last) Cell In1, line 3 1 from langchain.document_loaders.base import Document 2 from langchain.indexes import VectorstoreIndexCreator ----> 3 from langchain.utilities import ApifyWrapper ImportError: cannot import name 'ApifyWrapper' from 'langchain.utilities' (C:\Users\USER2023\anaconda3\lib\site-packages\langchain\utilities_init_.py)

**

enter image description here

I have checked the Langchain documentation and found that apify.ipynb is located in the tools folder. Attached link: https://github.com/langchain-ai/langchain/blob/master/docs/extras/integrations/tools/apify.ipynb

Please suggestions to solve it.

1
  • at a guick glance(history), i could not find a trace of code for this wrapper in repo, pls refer this open issue on github Commented Aug 4, 2023 at 13:12

1 Answer 1

1

latest version(0.0.251) of langchain missing this Wrapper(need to dig more on it), so you can move back to the prior version.

pip install langchain==0.0.187

this version will work and import will be successful.

Sign up to request clarification or add additional context in comments.

1 Comment

Now, do you know what version works with 'create_extraction_chain' from 'langchain.chains'? I can not import it. Please help me. Thank you for your response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.