New site broken on latest develop

bench new-site aviation
bench --site aviation install-app erpnext

Installing erpnext…
Updating DocTypes for erpnext : [ ]Traceback (most recent call last):
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 199, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/init.py”, line 799, in get_module
return importlib.import_module(modulename)
File “/home/cameron/development/frappe-bench/env/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 978, in _gcd_import
File “”, line 961, in _find_and_load
File “”, line 950, in _find_and_load_unlocked
File “”, line 655, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 205, in _call_with_frames_removed
File “/home/cameron/development/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py”, line 12, in
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry, get_company_defaults
File “/home/cameron/development/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py”, line 11, in
from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account
File “/home/cameron/development/frappe-bench/apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py”, line 11, in
from erpnext.hr.doctype.expense_claim.expense_claim import update_reimbursed_amount
File “/home/cameron/development/frappe-bench/apps/erpnext/erpnext/hr/doctype/expense_claim/expense_claim.py”, line 9, in
from erpnext.hr.utils import set_employee_name
File “/home/cameron/development/frappe-bench/apps/erpnext/erpnext/hr/utils.py”, line 10, in
from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee
File “/home/cameron/development/frappe-bench/apps/erpnext/erpnext/hr/doctype/employee/employee.py”, line 7, in
from frappe.utils import getdate, validate_email_add, today, add_years, format_datetime
ImportError: cannot import name ‘validate_email_add’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/cameron/.pyenv/versions/3.6.1/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/home/cameron/.pyenv/versions/3.6.1/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/cameron/development/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/cameron/development/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/cameron/development/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/cameron/development/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/cameron/development/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/cameron/development/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/cameron/development/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/commands/site.py”, line 169, in install_app
_install_app(app, verbose=context.verbose)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/installer.py”, line 84, in install_app
sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/model/sync.py”, line 56, in sync_for
reset_permissions=reset_permissions, for_sync=True)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 65, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 133, in import_doc
doc.insert()
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/model/document.py”, line 249, in insert
self.run_post_save_methods()
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/model/document.py”, line 916, in run_post_save_methods
self.run_method(“on_update”)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/model/document.py”, line 781, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/model/document.py”, line 1061, in composer
return composed(self, method, *args, **kwargs)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/model/document.py”, line 1044, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/model/document.py”, line 775, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 264, in on_update
self.run_module_method(“on_doctype_update”)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 331, in run_module_method
module = load_doctype_module(self.name, self.module)
File “/home/cameron/development/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 201, in load_doctype_module
raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request Error: cannot import name ‘validate_email_add’)

Hello, I have a similar error when bench update

bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up to date.
INFO:bench.utils:./env/bin/pip install Pillow
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (5.3.0)
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/develop
HEAD is now at 26197ee29 Merge pull request #6878 from Mangesh-Khairnar/privacy-data
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling frappe_io
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 71f0f03 Merge pull request #142 from sagarvora/fetch_if_empty
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/develop
HEAD is now at 349a1157ef Merge pull request #16717 from jigartarpara/fix_payment_term_template
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling foundation
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 158e38c1 Merge pull request #411 from akurungadam/patch-6
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (19.0.3)
INFO:bench.utils:./env/bin/pip install -q -r /home/ubuntu/bench/requirements.txt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing frappe
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/frappe 
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing frappe_io
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/frappe_io 
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/erpnext 
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:installing foundation
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/foundation 
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Updating node packages...
INFO:bench.utils:yarn install
yarn install v1.10.1
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.29s.
INFO:bench.utils:yarn install
yarn install v1.10.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > bootstrap@4.3.1" has unmet peer dependency "jquery@1.9.1 - 3".
warning " > bootstrap@4.3.1" has unmet peer dependency "popper.js@^1.14.7".
[4/4] Building fresh packages...
Done in 3.22s.
Backing up sites...
Patching sites...
Migrating site2.local
Executing erpnext.patches.v11_0.renamed_from_to_fields_in_project in site2.local (_a46003081c220c38)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
	"__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
	exec code in run_globals
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
	main()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
	click.Group(commands=commands)(prog_name='bench')
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
	return self.main(*args, **kwargs)
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 717, in main
	rv = self.invoke(ctx)
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
	return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
	return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
	return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
	return callback(*args, **kwargs)
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
	return f(get_current_context(), *args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
	ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/site.py", line 228, in migrate
	migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/migrate.py", line 37, in migrate
	frappe.modules.patch_handler.run_all()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
	if not run_single(patchmodule = patch):
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
	return execute_patch(patchmodule, method, methodargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
	frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py", line 9, in execute
	frappe.reload_doc('projects', 'doctype', 'project')
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/__init__.py", line 790, in reload_doc
	return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/utils.py", line 169, in reload_doc
	return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 26, in import_files
	reset_permissions=reset_permissions)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 31, in import_file
	ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 65, in import_file_by_path
	ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 133, in import_doc
	doc.insert()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 249, in insert
	self.run_post_save_methods()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 916, in run_post_save_methods
	self.run_method("on_update")
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 781, in run_method
	out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 1061, in composer
	return composed(self, method, *args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 1044, in runner
	add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 775, in <lambda>
	fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 264, in on_update
	self.run_module_method("on_doctype_update")
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 331, in run_module_method
	module = load_doctype_module(self.name, self.module)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/utils.py", line 201, in load_doctype_module
	raise ImportError('Module import failed for {0} ({1})'.format(doctype, module_name + ' Error: ' + str(e)))
ImportError: Module import failed for Project (erpnext.projects.doctype.project.project Error: cannot import name validate_email_add)

Hello,
I succeed in doing bench update but for me the error message appears when i try to go to Journal Entry in module Accounts :
ImportError: Module import failed for Journal Entry (erpnext.accounts.doctype.journal_entry.journal_entry Error: cannot import name 'validate_email_add')

Solved for me
For me the error occured when i tried to access Accounts → Journal Entry and was solved by changing validate_email_add by validate_email_address in frappe-bench/apps/erpnext/hr/employee/employee.py
Seems to have an issue of this type on github
https://github.com/frappe/erpnext/pull/16929

thankz works for me to

Even I had got the same error, validate_email_add

How and where did you change?

ok in your bench app /erpnext /erpnext /hr /doctype/employee /employee. py
i changed

line 7

line 145

lune 147

hope that helps you

This has been updated on develop branch, just need to pull latest