Doppio Bot Integration

Hi @Nagaria Hussain

i installed the app and added my api key
but when trying to ask through the chat
i got the following error

ImportError: cannot import name ‘TypeAdapter’ from ‘pydantic’ (env/lib/python3.10/site-packages/pydantic/init.cpython-310-x86_64-linux-gnu.so)

First of all, I want you to know where the problem is in the Pydantic Package
, when you install the application Doppio Bot.
One of its requirements is the pydantic version == 2.3.0 and its version in your version is incompatible :slightly_smiling_face: according to the message that appears to you when installing the package. :expressionless:


ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
frappe 15.20.0 requires pydantic==2.3.0, but you have pydantic 2.7.1 which is incompatible.
langchain 0.0.135 requires pydantic<2,>=1, but you have pydantic 2.7.1 which is incompatible.

To fix the ImportError related to pydantic in ERPNext, you can try the following steps:

1. Activate your virtual environment:

$ cd <path_to_your_erpnext_directory> For clarification, go to $cd frappe-bench

$ source env/bin/activate

2. Upgrade the pydantic package using pip:

$ pip install --upgrade pydantic

3. Restart your ERPNext instance:

$ bench restart


If the upgrade doesn’t resolve the issue, you may need to reinstall the pydantic package:


1. Activate your ERPNext virtual environment:

$ cd <path_to_your_erpnext_directory> For clarification, go to $cd frappe-bench

$ source env/bin/activate

2. Uninstall the pydantic package:

$ pip uninstall pydantic

3. Reinstall the pydantic package:

$ pip install pydantic

4. Restart your ERPNext instance:

$ bench restart

After reinstalling the pydantic package and restarting ERPNext, the ImportError related to TypeAdapter should be resolved

1 Like

Thank u
i followed your steps and i passed the first error message

but unfortunately i faced another error

I had similar issue and following changes fixed my issue

  1. pip install --upgrade pydantic
  2. pip install langchain==0.0.353

Older langchain version had some issue with pydantic and upgrading to latest version fixed the issues