When starting a docker image with frappe v13.15.0 and erpnext v.13.15.2, I get the error below. And indeed, erpnext/shopping_cart/utils.py has been moved to ecommerce since v.13.11, see this commit. But then why is erpnext.shopping_cart.utils still referenced?
[2021-12-04 19:52:17 +0000] [18] [ERROR] Error handling request /
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 49, in render
data = render_page_by_language(path)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 178, in render_page_by_language
return render_page(path)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 194, in render_page
return build(path)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 201, in build
return build_page(path)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 216, in build_page
context = get_context(path)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py", line 28, in get_context
context = build_context(context)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py", line 134, in build_context
values = frappe.get_attr(method)(context)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1199, in get_attr
return getattr(get_module(modulename), methodname)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 975, in get_module
return importlib.import_module(modulename)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'erpnext.shopping_cart.utils'
These are the only rows in the DB related to shopping_cart
('49c53466ce','2015-08-07 02:33:52.670866','2021-07-20 07:29:43.586529','Administrator','Administrator',0,'Tax Rule','fields','DocType',2,'use_for_shopping_cart','Use for Shopping Cart',NULL,'Check',NULL,NULL,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,'1',NULL,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,NULL,0),
('853b2cca8e','2013-03-07 11:42:57.000000','2021-09-28 14:28:48.877285','Administrator','Administrator',0,'Quotation Item','fields','DocType',67,'shopping_cart_section','Shopping Cart',NULL,'Section Break',NULL,NULL,0,0,0,0,0,0,0,0,0,1,0,0,0,0,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,NULL,0),
('cb834795d5','2013-03-07 11:42:58.000000','2021-04-29 09:02:41.458766','Administrator','Administrator',0,'Sales Order Item','fields','DocType',79,'shopping_cart_section','Shopping Cart',NULL,'Section Break',NULL,NULL,0,0,0,0,0,0,0,0,0,1,0,0,0,0,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,NULL,0),
('PATCHLOG00065','2020-12-05 23:49:35.877510','2020-12-05 23:49:35.877510','Administrator','Administrator',0,NULL,NULL,NULL,0,'frappe.patches.v5_0.remove_shopping_cart_app',NULL,NULL,NULL,NULL),
('PATCHLOG01165','2021-10-08 06:17:41.528459','2021-10-08 06:17:41.528459','Administrator','Administrator',0,NULL,NULL,NULL,0,'erpnext.patches.v13_0.shopping_cart_to_ecommerce',NULL,NULL,NULL,NULL),
`use_for_shopping_cart` int(1) NOT NULL DEFAULT 1,
… and removing them does not solve the problem.
EDIT: when using the containers tagged with ‘latest’, I get another shopping_cart related problem:
[2021-12-05 10:55:15 +0000] [21] [ERROR] Error handling request /
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 205, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 903, in get_module
return importlib.import_module(modulename)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'frappe.core.doctype.shopping_cart_settings'