Error in pydantic config

logs tail 100-f web.error.log
tail: cannot open ‘100-f’ for reading: No such file or directory
==> web.error.log <==
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 1278, in
def rename_doc(
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 739, in innerfn
from frappe.utils.typing_validations import validate_argument_types
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/typing_validations.py”, line 6, in
from pydantic.config import BaseConfig
ModuleNotFoundError: No module named ‘pydantic.config’

I also tried re installing pydantic its not working

Hi @Ramki_Marichamy,

Just for information,

If not installed then use it command:

sudo pip3 install pydantic

latest version by running the following command:

sudo pip install --upgrade pydantic

Otherwise, try it in env.

./env/bin/pip3 install pydantic

Hope, maybe this will work.

Thank You!

3 Likes

Had a similar issue, in my case the pydantic was already installed. I removed and installed again but same problem. I even created a new pip3 environment and installed again, but still same problem.

SOLUTION:

bench pip install pydantic

:slightly_smiling_face:

1 Like

Error while upgrading from V14 to V15

bench update --patch --no-backup
ModuleNotFoundError: No module named 'pydantic'

Patching sites…
Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/usr/lib/python3.10/runpy.py”, line 110, in _get_module_details
import(pkg_name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1375, in
def rename_doc(
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 786, in innerfn
from frappe.utils.typing_validations import validate_argument_types
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/typing_validations.py”, line 7, in
from pydantic import ConfigDict
ModuleNotFoundError: No module named ‘pydantic’

Thanks @NCP , it worked.

2 Likes