Update error 12.07.2016

Hi There,
had the following error during update…

frappe@erp:~$ bench update --upgrade
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
Von https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling erpnext
Von https://github.com/frappe/erpnext
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
Migrating deploy.local
Updating frappe                     : [========================================]
Updating erpnext                    : [========================================]
Migrating erp.pundp.berlin
Executing erpnext.patches.v7_0.convert_timelogbatch_to_timesheet in erp.pundp.berlin (3ce197f3a7)
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/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/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 182, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 27, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py", line 19, in execute
    time_sheet.save(ignore_permissions=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 237, in save
    self.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 213, in insert
    self.run_post_save_methods()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in run_post_save_methods
    self.run_method("on_submit")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 606, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 771, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 754, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 600, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 65, in on_submit
    self.validate_mandatory_fields()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 92, in validate_mandatory_fields
    frappe.throw(_("Row {0}: Billing Rate must be greater than zero.").format(data.idx))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 299, in throw
    msgprint(msg, raise_exception=exc, title=title)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 292, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 265, in _raise_exception
    raise raise_exception, encode(msg)
frappe.exceptions.ValidationError: Row 1: Billing Rate must be greater than zero.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==2.0.0', 'console_scripts', 'bench')()
  File "/home/frappe/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/frappe/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 90, in _update
    patch_sites(bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 134, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 499, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')

any suggestions?

Hi @spa,

Have fixed the issue, please take latest update

Thanks, Rohit

1 Like

Hi @rohit_w,

thank you for your reply but now I´m facing the following

`frappe@erp:~$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 34 (delta 28), reused 29 (delta 23), pack-reused 0
Entpacke Objekte: 100% (34/34), Fertig.
Von https://github.com/frappe/frappe
b4219c9…45c8e63 develop -> upstream/develop
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
Von https://github.com/frappe/frappe

  • branch develop -> FETCH_HEAD
    Aktualisiere b4219c9…45c8e63
    Fast-forward
    frappe/email/doctype/email_group/email_group.py | 9 ++±-
    frappe/hooks.py | 7 +±-
    frappe/public/css/desk.css | 1 +
    frappe/public/css/form_grid.css | 61 ++++++++++++++++±-------------
    frappe/public/js/frappe/form/control.js | 20 +++++±----
    frappe/public/js/frappe/form/grid.js | 361 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++±-------------------------------------------------------------------
    frappe/public/js/legacy/clientscriptAPI.js | 14 ++++±–
    frappe/public/js/legacy/globals.js | 3 ++
    frappe/public/less/desk.less | 1 +
    frappe/public/less/form_grid.less | 70 +++++++++++++++++++++±-------------
    frappe/templates/base.html | 2 ±
    11 files changed, 342 insertions(+), 207 deletions(-)
    mode change 100644 => 100755 frappe/email/doctype/email_group/email_group.py
    INFO:bench.app:pulling erpnext
    remote: Counting objects: 52, done.
    remote: Compressing objects: 100% (22/22), done.
    remote: Total 52 (delta 43), reused 39 (delta 30), pack-reused 0
    Entpacke Objekte: 100% (52/52), Fertig.
    Von https://github.com/frappe/erpnext
  • branch develop -> FETCH_HEAD
    1f15cf4…b814a54 develop -> upstream/develop
    Aktualisiere 1f15cf4…b814a54
    Fast-forward
    erpnext/accounts/doctype/payment_entry/payment_entry.json | 6 ++±–
    erpnext/accounts/doctype/payment_entry/payment_entry_list.js | 6 ++++++
    erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json | 6 ++±–
    erpnext/demo/demo.py | 23 +++++++++++++++++++++++
    erpnext/demo/setup_data.py | 5 +++++
    erpnext/demo/user/accounts.py | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    erpnext/demo/user/purchase.py | 5 +++±
    erpnext/demo/user/stock.py | 5 +++±
    erpnext/manufacturing/doctype/production_order/production_order.py | 1 +
    erpnext/patches/v7_0/convert_timelog_to_timesheet.py | 14 ++++++++++±–
    erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py | 17 ++±-------------
    erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py | 2 ++
    erpnext/projects/doctype/timesheet/timesheet.json | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++±-
    erpnext/projects/doctype/timesheet/timesheet.py | 4 +±-
    erpnext/templates/pages/home.html | 2 –
    15 files changed, 187 insertions(+), 31 deletions(-)
    create mode 100644 erpnext/accounts/doctype/payment_entry/payment_entry_list.js
    create mode 100644 erpnext/demo/user/accounts.py
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating deploy.local
    Updating frappe : [========================================]
    Updating erpnext : [========================================]
    Migrating erp.pundp.berlin
    Executing erpnext.patches.v7_0.convert_timelogbatch_to_timesheet in erp.pundp.berlin (3ce197f3a7)
    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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/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/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
    ret = f(frappe.dict(ctx.obj), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 182, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
    if not run_single(patchmodule = patch):
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py”, line 20, in execute
    time_sheet.save(ignore_permissions=True)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 237, in save
    self.insert()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 213, in insert
    self.run_post_save_methods()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_post_save_methods
    self.run_method(“on_submit”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 606, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 771, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 754, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 600, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 67, in on_submit
    self.update_task_and_project()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 130, in update_task_and_project
    frappe.get_doc(“Project”, data.project).update_project()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/project/project.py”, line 91, in update_project
    self.save(ignore_permissions = True)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 247, in save
    self.run_before_save_methods()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 645, in run_before_save_methods
    self.run_method(“validate”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 606, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 771, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 754, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 600, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/project/project.py”, line 47, in validate
    self.send_welcome_email()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/project/project.py”, line 151, in send_welcome_email
    frappe.sendmail(user.user, subject=
    (“Project Collaboration Invitation”), content=content.format(*messages))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 393, in sendmail
    send_after=send_after, expose_recipients=expose_recipients, send_priority=send_priority, communication=communication)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py”, line 53, in send
    email_account = get_outgoing_email_account(True, append_to=reference_doctype)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py”, line 58, in get_outgoing_email_account
    frappe.OutgoingEmailError)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 299, in throw
    msgprint(msg, raise_exception=exc, title=title)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 292, in msgprint
    _raise_exception()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 265, in _raise_exception
    raise raise_exception, encode(msg)
    frappe.exceptions.OutgoingEmailError: Please setup default Email Account from Setup > Email > Email Account
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench==2.0.0’, ‘console_scripts’, ‘bench’)()
    File “/home/frappe/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/frappe/bench-repo/bench/commands/update.py”, line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
    File “/home/frappe/bench-repo/bench/commands/update.py”, line 90, in _update
    patch_sites(bench_path=bench_path)
    File “/home/frappe/bench-repo/bench/utils.py”, line 134, in patch_sites
    run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench_path=bench_path)
    File “/home/frappe/bench-repo/bench/utils.py”, line 499, in run_frappe_cmd
    raise CommandFailedError(args)
    bench.utils.CommandFailedError: (’–site’, ‘all’, ‘migrate’)
    `

bench is still down… says
“Updating. We will be back in a few moments…”
on webpage

@spa,

Seems you have checked Welcome email sent on projects and not set the default email account for outgoing. Setup email account in site_config.json file for a while and remove once run the bench update command successfully. Check Default Outgoing Email Settings section under below link
https://github.com/frappe/frappe/blob/develop/frappe/docs/user/en/guides/basics/site_config.md

Thanks, Rohit

Hi @rohit_w,

great thanks,

had to fiddle around to get the JSON valid - screwed up with the delimiters

but after some tries it worked like a charm

thanks again

… can be closed