Switch branches in V11 [ cannot import name Database issue]

If you are shifting between branches and facing this error (I face this error when I switch to develop and then back to staging-fixes), run the following command

# if you are in frappe-bench folder
frappe-bench > cd apps/frappe
frappe-bench/apps/frappe > find . -name "*.pyc" -exec rm -f {} \;

Basically, all the .pyc needs to be rebuild because of changes in lots of core files.

10 Likes