Hello Everyone,
I’m facing an issue while upgrading my existing sites after switching to a newly built custom Docker image.
Setup Details
I created a custom image using:
https://github.com/castlecraft/custom_containers
My bench and sites are running in Docker Swarm based on:
https://github.com/castlecraft/custom_containers/blob/main/docs/docker-swarm.md
Note: I am not using the default
frappe/erpnextimage — I am using my own custom-built image.
Image Versions:
FRAPPE_VERSION=v15.69.1
PY_VERSION=3.11.6
NODEJS_VERSION=18.18.2
Installed Apps:
-
erpnext : v15.63.0
-
payments : version-15
-
hrms : v15.46.0
-
lms : v2.30.0
-
india-compliance : v15.18.1
Upgrade Scenario
-
Existing sites were running on Frappe v15.56.1
-
I built a new custom image with Frappe v15.69.1
-
After switching to the new image, I executed:
bench migrate
During migration, the process fails with the following error:
ModuleNotFoundError: No module named 'pkg_resources'
The traceback indicates the failure occurs while loading the Google Calendar DocType:
ImportError: Module import failed for Google Calendar,
the DocType you're trying to open might be deleted.
Error: No module named 'pkg_resources'
From the traceback, it appears that googleapiclient is trying to import pkg_resources, but the module is not available in the environment.
Note
-
The Docker image builds successfully.
-
The issue only occurs during
bench migrate. -
I am using a fully custom image (not the official frappe/bench image).
Has anyone encountered a similar issue when upgrading minor v15 versions using a custom Docker image?
Any guidance to solve this issue would be greatly appreciated.
Thank you.