Rror: cannot import name 'clear_cache' from 'frappe.website.utils'

I am facing the following error on fresh installation or Bench nad ERPNext v13, Kindly assist…

*$ bench --site xxxx install-app erpnext*

Installing erpnext…
Updating DocTypes for erpnext : [ ] 0%An error occurred while installing erpnext:
Module import failed for Purchase Taxes and Charges Template (erpnext.accounts.doctype.purchase_taxes_and_charges_template.purchase_taxes_and_charges_template Error: cannot import name ‘clear_cache’ from ‘frappe.website.utils’ (/…/apps/frappe/frappe/website/utils.py))

After a workaround of adding the function to website/utils.py I get the following error (See Image) on accessing bench…

1 Like

When you run

bench get-app --branch version-13 erpnext

replace erpnext with the GitHub repo URL, ie https://github.com/frappe/erpnext.

It will work.

1 Like