Error while bench update --reset

Anyone saw this before?

Traceback (most recent call last):
File “/usr/lib/python3.5/”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/”, line 85, in _run_code
exec(code, run_globals)
File “/opt/erpnext/erpnext/apps/frappe/frappe/utils/”, line 97, in
File “/opt/erpnext/erpnext/apps/frappe/frappe/utils/”, line 18, in main
File “/opt/erpnext/erpnext/env/lib/python3.5/site-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/opt/erpnext/erpnext/env/lib/python3.5/site-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/opt/erpnext/erpnext/env/lib/python3.5/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/erpnext/erpnext/env/lib/python3.5/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/erpnext/erpnext/env/lib/python3.5/site-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/erpnext/erpnext/env/lib/python3.5/site-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/erpnext/erpnext/env/lib/python3.5/site-packages/click/”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/commands/”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/commands/”, line 252, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 41, in migrate
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 56, in clear_global_cache
File “/opt/erpnext/erpnext/apps/frappe/frappe/website/”, line 301, in clear_cache
for method in frappe.get_hooks(“website_clear_cache”):
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 974, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/opt/erpnext/erpnext/apps/frappe/frappe/utils/”, line 80, in get_value
self.set_value(original_key, val, user=user)
File “/opt/erpnext/erpnext/apps/frappe/frappe/utils/”, line 48, in set_value
self.set(key, pickle.dumps(val))
_pickle.PicklingError: Can’t pickle <class ‘module’>: attribute lookup module on builtins failed

Can you say what version ERPNext and what OS? Have you been able to run that command successfully before? Why is --reset being used?

Master branch from ERPNext and Ubuntu 18.04

I tried update with reset but still the same.

You don’t state what version you are on or seek?

In any case the current version branch is version-12 not master.

I am using develop branch

You can confirm that like this

frappe@ubuntu1804lts:~/frappe-bench$ bench version
erpnext 12.x.x-develop
frappe 12.x.x-develop

frappe@ubuntu:~/frappe-bench$ cd apps/frappe/
frappe@ubuntu:~/frappe-bench/apps/frappe$ git status
On branch develop
Your branch is up-to-date with ‘upstream/develop’.

Any solution on this?