Issues with update

Hi all,
have been having issues with email not working (although it WAS working back in nov). This is the output from a bench update… Wondering if anyone has any suggestions?

erpnext@erpnext-vm:~/frappe-bench$ bench update
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/cli.py”, line 60, in cli
bench()
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 610, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 590, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 210, in _update
version_upgrade = is_version_upgrade()
File “/home/erpnext/bench-repo/bench/app.py”, line 92, in is_version_upgrade
upstream_version = get_upstream_version(‘frappe’, bench=bench, branch=branch )
File “/home/erpnext/bench-repo/bench/app.py”, line 135, in get_upstream_versio n
return get_version_from_string(contents)
File “/home/erpnext/bench-repo/bench/app.py”, line 191, in get_version_from_st ring
return match.group(2)
AttributeError: ‘NoneType’ object has no attribute ‘group’

OK, so following a few other support threads led me to do a git pull origin after that I ran into another issue where I was getting a - tuple has not attribute __name__ error. That lead me to do another thread suggesting to run pip install --upgrade click as Root.
NOW I am getting:

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 5, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2707, in
working_set.require(requires)
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 686, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Click

Ok so managed to fix this with a setup call however NOW when I do an update I get:

File “/home/erpnext/bench-repo/bench/config/redis.py”, line 67, in get_max_redis_memory
total_virtual_mem = psutil.virtual_memory().total/(pow(1024, 2))
AttributeError: ‘module’ object has no attribute ‘virtual_memory’

erpnext@erpnext-vm:~/frappe-bench$ bench update

This update will replace ERPNext’s Redis configuration files to fix a major security issue.
If you don’t know what this means, type Y :wink:

Do you want to continue? [y/N]: y
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/commands/update.py”, line 31, in update
patches.run(bench_path=’.’)
File “/home/erpnext/bench-repo/bench/patches/init.py”, line 21, in run
result = execute(bench_path)
File “/home/erpnext/bench-repo/bench/patches/v3/redis_bind_ip.py”, line 10, in execute
generate_config(bench_path)
File “/home/erpnext/bench-repo/bench/config/redis.py”, line 32, in generate_config
“maxmemory”: config.get(‘cache_maxmemory’, get_max_redis_memory()),
File “/home/erpnext/bench-repo/bench/config/redis.py”, line 67, in get_max_redis_memory
total_virtual_mem = psutil.virtual_memory().total/(pow(1024, 2))
AttributeError: ‘module’ object has no attribute ‘virtual_memory’
erpnext@erpnext-vm:~/frappe-bench$

Can you update your psutil library?

pip install psutil --upgrade ?

Awesome thanks so much!
that seemed to do the trick…

now… during the update to 7 I get the following:

any ideas?

Executing frappe.patches.v7_1.rename_scheduler_log_to_error_log in erpnext.erpnext-vm (erpnext)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, 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/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/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/erpnext/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py”, line 209, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/migrate.py”, line 30, in migrate
frappe.modules.patch_handler.run_all()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/patches/v7_1/rename_scheduler_log_to_error_log.py”, line 5, in execute
frappe.rename_doc(‘DocType’, ‘Scheduler Log’, ‘Error Log’)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 657, in rename_doc
return rename_doc(doctype, old, new, force=force, merge=merge, ignore_permissions=ignore_permissions)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/rename_doc.py”, line 39, in rename_doc
update_link_field_values(link_fields, old, new, doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/rename_doc.py”, line 152, in update_link_field_values
single_doc = frappe.get_doc(field[‘parent’])
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 596, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 48, in get_doc
controller = get_controller(doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 34, in get_controller
module = load_doctype_module(doctype, module_name)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 173, in load_doctype_module
raise ImportError, ‘Module import failed for {0} ({1})’.format(doctype, module_name)
ImportError: Module import failed for Payment Tool (erpnext.accounts.doctype.payment_tool.payment_tool)
erpnext@erpnext-vm:~/frappe-bench$

PS: AND the web side is now broken “Updating. We will be back in a few moments…”

Hello
How did you fix the error distributionNotFound: Click ?

When i run this

pip list | grep click

Shows click (6.7)

with
SNIMIssingWarning
InsecureplatformWarning

Stuck on exact same issue.
Any one got through it ?
this is debian wheezy VM
Stuck on updateing. we will be back in few moments
Bench Version shows
Frappe: 7.2.18
Erpnext: 7.12.14

Same here…

File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/rename_doc.py”, line 155, in update_link_field_values
single_doc = frappe.get_doc(field[‘parent’])
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/init.py”, line 602, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 49, in get_doc
controller = get_controller(doctype)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 34, in get_controller
module = load_doctype_module(doctype, module_name)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 185, in load_doctype_module
raise ImportError, ‘Module import failed for {0} ({1})’.format(doctype, module_name)
ImportError: Module import failed for Payment Tool (erpnext.accounts.doctype.payment_tool.payment_tool)