Erpnext Update Errors

Today i tried to bench update

and i got that errors

frappe@erpnext:~/frappe-bench$ bench update
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
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Updating f92f04b…44281b7
    error: Your local changes to the following files would be overwritten by merge:
    erpnext/accounts/doctype/journal_entry/journal_entry.json
    erpnext/accounts/doctype/payment_entry/payment_entry.json
    erpnext/projects/doctype/task/task.json
    erpnext/projects/doctype/timesheet/timesheet.json
    erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
    erpnext/selling/doctype/quotation/quotation.json
    erpnext/setup/doctype/company/company.json
    Please, commit your changes or stash them before you can merge.
    Aborting
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench’, ‘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 76, in _update
    pull_all_apps(bench_path=bench_path)
    File “/home/frappe/bench-repo/bench/app.py”, line 140, in pull_all_apps
    remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
    File “/home/frappe/bench-repo/bench/utils.py”, line 127, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: git pull upstream master
    frappe@erpnext:~/frappe-bench$

=========================================================

After i that i tried to open the web and login But i got that error and i cant login.

Oops, a server error has occured
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 32, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 101, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 117, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 140, in build_page
html = frappe.render_template(context.source, context)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py”, line 50, in render_template
return get_jenv().from_string(template).render(context)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 989, in render
return self.environment.handle_exception(exc_info, True)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File “”, line 1, in top-level template code
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/web.html”, line 1, in top-level template code
{% extends base_template_path %}
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/base.html”, line 100, in top-level template code
{%- block script %}{%- endblock %}
File “”, line 90, in block “script”
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/includes/login/login.js”, line 58, in top-level template code
args.cmd = “{{ ldap_settings.method }}”;
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 408, in getattr
return getattr(obj, attribute)
UndefinedError: ‘ldap_settings’ is undefined

==========================================

Hi, please go to the apps/erpnext folder and run
git reset --hard or sudo git reset --hard
and then run again bench update
Btw do you need you own changes in the core code of erpnext?

1 Like

thx alot dear i will try your method but can u plz explain to me

“Btw do you need you own changes in the core code of erpnext?”

error: Your local changes to the following files would be overwritten by merge:
erpnext/accounts/doctype/journal_entry/journal_entry.json
erpnext/accounts/doctype/payment_entry/payment_entry.json
erpnext/projects/doctype/task/task.json
erpnext/projects/doctype/timesheet/timesheet.json
erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
erpnext/selling/doctype/quotation/quotation.json
erpnext/setup/doctype/company/company.json
Please, commit your changes or stash them before you can merge.
Aborting

here is your own changes in core(erpnext) code… you made them… that’s why I asked do you need it?

1 Like

thx a lot for your help
can i keep it
or the update will remove that customizations ?

for updating you should remove

i read before that if the customization was mad from
custome field
it will not conflict with the update
but if the customization was in DOCTYPE
then it will be removed
right ?

Yes and I never tried but I think if you use Customize Form or Property Setter for changes in Doctype everything should be ok

1 Like

Thx Alot Dear.

1 Like