Server Error => KeyError: 'shopping_cart'

hi gurus,
After last update I ended up with below error (Screen shot & Traceback) while trying to enter/navigate “Shopping Cart Setting”:

Traceback (most recent call last):
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/app.py”, line 68, in application
response = frappe.api.handle()
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/handler.py”, line 31, in handle
data = execute_cmd(cmd)
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/handler.py”, line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/init.py”, line 1198, in call
return fn(*args, **newargs)
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 71, in getdoctype
docs = get_meta_bundle(doctype)
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 81, in get_meta_bundle
bundle = [frappe.desk.form.meta.get_meta(doctype)]
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 26, in get_meta
meta = FormMeta(doctype)
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 39, in init
self.load_assets()
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 49, in load_assets
self.add_code()
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 81, in add_code
path = os.path.join(get_module_path(self.module), ‘doctype’, scrub(self.name))
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 167, in get_module_path
return frappe.get_module_path(module)
File “/home/jctkorp/frappe-bench/apps/frappe/frappe/init.py”, line 981, in get_module_path
return get_pymodule_path(local.module_app[module] + “.” + module, *joins)
KeyError: ‘shopping_cart’

What can be done to solve this? Pls suggest.

Please also note while I run “bench update” output is >>
Cannot proceed with update: You have local changes in app “frappe” that are not committed.

Here are your choices:

  1. Merge the frappe app manually with “git pull” / “git pull --rebase” and fix conflicts.
  2. Temporarily remove your changes with “git stash” or discard them completely
    with “bench update --reset” or for individual repositries “git reset --hard”
  3. If your changes are helpful for others, send in a pull request via GitHub and
    wait for them to be merged in the core.

Please help…

Even I am facing the same issue. Any help will be much appreciated

I just raised the issue

https://github.com/frappe/erpnext/issues/27760

1 Like

This issue is fixed and will be released as part of next update.

Shopping cart and Product settings are merged into E-commerce settings. For more details checkout this docs.

https://docs.erpnext.com/docs/v13/user/manual/en/e_commerce/set_up_e_commerce

I have also same issue. Take a look on it

linked_doctypes[df["options"]] = df["fieldname"]
 KeyError: 'options'

Can Someone help me that what was the issue there.

The cause of this is that frappe is trying to run the execute function of the script report, and is to get the linked doctypes for the column fields you constructed. This particular error arise when you have a field that is a Link fieldtype. This code tries to access the ‘options’ key value (which will be the doctype) on the column dictionary, and is not getting the ‘options’ key, possibly due to a typo. The simple fix is to check your column dictionary, and make sure that all the ones of fieldtype Link have the ‘options’ key correctly spelt. Below is the snippet within frappe in file frappe.frappe.desk.query_report.py where this is implemented, and where the error originates from.

def get_linked_doctypes(columns, data):
	linked_doctypes = {}

	columns_dict = get_columns_dict(columns)

	for idx, col in enumerate(columns):
		df = columns_dict[idx]
		if df.get("fieldtype")=="Link":
			if data and isinstance(data[0], (list, tuple)):
				linked_doctypes[df["options"]] = idx
			else:
				# dict
				linked_doctypes[df["options"]] = df["fieldname"]