Why this error appear when I send a message?

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 114, in application
response = frappe.api.handle(request)
File “apps/frappe/frappe/api/init.py”, line 49, in handle
data = endpoint(**arguments)
File “apps/frappe/frappe/api/v1.py”, line 36, in handle_rpc_call
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 50, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1726, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/utils/typing_validations.py”, line 29, in wrapper
args, kwargs = transform_parameter_types(func, args, kwargs)
File “apps/frappe/frappe/utils/typing_validations.py”, line 141, in transform_parameter_types
current_arg_value_after = TypeAdapter(current_arg_type).validate_python(current_arg_value)
File “apps/frappe/frappe/utils/typing_validations.py”, line 71, in TypeAdapter
from pydantic import TypeAdapter as PyTypeAdapter
ImportError: cannot import name ‘TypeAdapter’ from ‘pydantic’ (env/lib/python3.10/site-packages/pydantic/init.cpython-310-x86_64-linux-gnu.so)

pip show pydantic
pip install --upgrade pydantic

I installed it then I restarted the bench
but when I check it
root@erpnext-163743-erp-0:/cloudclusters/erpnext/frappe-bench# pip show pydantic
WARNING: Package(s) not found: pydantic

my problem is when I restart the bench it tells me that the package notfound!!

check by activating a virtual env?