Updating ERPNext with latest version

Gettng this error while updating erpnext

[root@erp9 frappe-bench]# bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Updating d100813…6591e53
    Fast-forward
    frappe/init.py | 2 ±
    frappe/build.js | 15 +++++++++±----
    frappe/core/doctype/domain/domain.py | 24 ++++++++++++++++++++++++
    frappe/core/doctype/domain_settings/domain_settings.py | 1 -
    frappe/core/page/modules_setup/includes/module_icons.html | 2 ±
    frappe/core/page/usage_info/usage_info.html | 10 +++++±—
    frappe/integrations/doctype/dropbox_settings/dropbox_settings.py | 41 ++++++++++++++++++++±-------------------
    frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py | 2 ±
    frappe/model/delete_doc.py | 31 ++++++++++++++++++++++±-------
    frappe/model/document.py | 5 ++±-
    frappe/patches.txt | 3 +±
    frappe/patches/v9_1/resave_domain_settings.py | 10 +++++±—
    frappe/patches/v9_1/revert_domain_settings.py | 10 ++++++++++
    frappe/public/js/frappe/form/controls/dynamic_link.js | 18 +++++++++++±-----
    frappe/public/js/frappe/form/grid_row.js | 2 ±
    frappe/public/js/frappe/views/reports/query_report.js | 34 +++++++++++++++++++++±-----------
    frappe/utils/jinja.py | 1 +
    frappe/utils/print_format.py | 4 +±-
    frappe/utils/selenium_testdriver.py | 2 ±
    frappe/website/doctype/help_article/help_article.py | 2 ±
    requirements.txt | 2 ±
    21 files changed, 149 insertions(+), 72 deletions(-)
    create mode 100644 frappe/patches/v9_1/revert_domain_settings.py
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    remote: Counting objects: 309, done.
    remote: Total 309 (delta 238), reused 238 (delta 238), pack-reused 71
    Receiving objects: 100% (309/309), 55.43 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (252/252), completed with 124 local objects.
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Updating 758c389…7b83380
    Fast-forward
    erpnext/init.py | 2 ±
    erpnext/accounts/doctype/payment_entry/payment_entry.js | 32 +++±–
    erpnext/accounts/doctype/pos_profile/pos_profile.js | 4 ±
    erpnext/accounts/doctype/pos_profile/pos_profile.py | 2 ±
    erpnext/accounts/doctype/pos_settings/pos_settings.py | 7 ±
    erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 ±
    erpnext/accounts/party.py | 3 -
    erpnext/accounts/report/accounts_receivable/accounts_receivable.html | 15 ++±
    erpnext/accounts/utils.py | 4 ±
    erpnext/buying/doctype/purchase_order/purchase_order.py | 8 ++
    erpnext/controllers/accounts_controller.py | 9 ±
    erpnext/controllers/buying_controller.py | 2 ±
    erpnext/crm/doctype/opportunity/opportunity.py | 18 +±-
    erpnext/crm/doctype/opportunity/opportunity_dashboard.py | 1 +
    erpnext/demo/setup/setup_data.py | 7 ±
    erpnext/healthcare/doctype/consultation/consultation.js | 1 +
    erpnext/healthcare/doctype/consultation/consultation.json | 4 ±
    erpnext/healthcare/doctype/consultation/consultation.py | 22 ++±-
    erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.js | 2 +
    erpnext/healthcare/doctype/lab_test/lab_test.json | 6 ±
    erpnext/healthcare/doctype/patient/patient.json | 39 ±------
    erpnext/healthcare/doctype/patient/patient.py | 7 ±
    erpnext/healthcare/doctype/patient/patient_dashboard.py | 4 ±
    erpnext/healthcare/doctype/patient_appointment/patient_appointment.js | 9 ++
    erpnext/healthcare/doctype/patient_appointment/patient_appointment.json | 214 +++++++++++++++±---------------------------
    erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json | 13 ±-
    erpnext/healthcare/doctype/physician/physician.js | 1 +
    erpnext/healthcare/doctype/physician_schedule/physician_schedule.js | 2 ±
    erpnext/healthcare/doctype/vital_signs/vital_signs.json | 33 +++++±
    erpnext/hr/doctype/employee_loan/test_employee_loan.py | 4 ±
    erpnext/hr/doctype/process_payroll/process_payroll.py | 48 ++++±----
    erpnext/hr/doctype/process_payroll/test_process_payroll.py | 167 +++++++++++++++++++++++++++++±—
    erpnext/hr/doctype/salary_slip/salary_slip.json | 75 +++++++++++++±-
    erpnext/hr/doctype/salary_slip/salary_slip.py | 37 +++++±-
    erpnext/hr/doctype/salary_slip_loan/init.py | 0
    erpnext/hr/doctype/salary_slip_loan/salary_slip_loan.json | 256 +++++++++++++++++++++++++++++++++++++++++++++++++++++
    erpnext/hr/doctype/salary_slip_loan/salary_slip_loan.py | 10 +++
    erpnext/hr/doctype/salary_structure/test_salary_structure.py | 34 +++±–
    erpnext/manufacturing/doctype/production_order/production_order.py | 2 +
    erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.py | 118 ++++++++++++±----------
    erpnext/patches.txt | 6 ++
    erpnext/patches/v9_0/update_employee_loan_details.py | 24 +++++
    erpnext/patches/v9_2/init.py | 0
    erpnext/patches/v9_2/delete_healthcare_domain_default_items.py | 16 ++++
    erpnext/patches/v9_2/remove_company_from_patient.py | 5 ++
    erpnext/patches/v9_2/rename_translated_domains_in_en.py | 31 +++++++
    erpnext/patches/v9_2/repost_reserved_qty_for_production.py | 7 ++
    erpnext/patches/v9_2/set_item_name_in_production_order.py | 11 +++
    erpnext/public/js/controllers/transaction.js | 38 ++++±–
    erpnext/selling/doctype/sales_order/sales_order.py | 2 ±
    erpnext/selling/page/point_of_sale/point_of_sale.js | 62 ++++++++±—
    erpnext/setup/doctype/party_type/party_type.json | 28 ++±–
    erpnext/setup/doctype/party_type/test_party_type.js | 23 +++++
    erpnext/setup/doctype/sales_partner/sales_partner.js | 2 ±
    erpnext/setup/setup_wizard/install_fixtures.py | 12 ±-
    erpnext/setup/setup_wizard/setup_wizard.py | 6 ±
    erpnext/stock/doctype/bin/bin.py | 2 ±
    erpnext/stock/doctype/item/item.py | 2 ±
    erpnext/stock/doctype/stock_entry/stock_entry.js | 228 ++++++++++++++++++++++++++±-------------------
    erpnext/stock/doctype/stock_entry/stock_entry.py | 2 ±
    erpnext/stock/get_item_details.py | 16 ±–
    61 files changed, 1210 insertions(+), 537 deletions(-)
    create mode 100644 erpnext/hr/doctype/salary_slip_loan/init.py
    create mode 100644 erpnext/hr/doctype/salary_slip_loan/salary_slip_loan.json
    create mode 100644 erpnext/hr/doctype/salary_slip_loan/salary_slip_loan.py
    create mode 100644 erpnext/patches/v9_0/update_employee_loan_details.py
    create mode 100644 erpnext/patches/v9_2/init.py
    create mode 100644 erpnext/patches/v9_2/delete_healthcare_domain_default_items.py
    create mode 100644 erpnext/patches/v9_2/remove_company_from_patient.py
    create mode 100644 erpnext/patches/v9_2/rename_translated_domains_in_en.py
    create mode 100644 erpnext/patches/v9_2/repost_reserved_qty_for_production.py
    create mode 100644 erpnext/patches/v9_2/set_item_name_in_production_order.py
    create mode 100644 erpnext/setup/doctype/party_type/test_party_type.js
    INFO:bench.utils:find . -name “*.pyc” -delete
    find: cannot delete ‘./erpnext/stock/doctype/category_group/category_group.pyc’: Permission denied
    find: cannot delete ‘./erpnext/stock/doctype/category_group/init.pyc’: Permission denied
    Traceback (most recent call last):
    File “/usr/bin/bench”, line 9, in
    load_entry_point(‘bench==4.1.0’, ‘console_scripts’, ‘bench’)()
    File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
    bench_command()
    File “/usr/lib64/python2.7/site-packages/click/core.py”, line 722, in call
    return self.main(args, **kwargs)
    File “/usr/lib64/python2.7/site-packages/click/core.py”, line 697, in main
    rv = self.invoke(ctx)
    File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/lib64/python2.7/site-packages/click/core.py”, line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/lib64/python2.7/site-packages/click/core.py”, line 535, in invoke
    return callback(args, **kwargs)
    File “/home/frappe/bench-repo/bench/commands/update.py”, line 58, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
    File “/home/frappe/bench-repo/bench/commands/update.py”, line 71, in _update
    pull_all_apps(bench_path=bench_path, reset=reset)
    File “/home/frappe/bench-repo/bench/app.py”, line 171, in pull_all_apps
    exec_cmd('find . -name "
    .pyc" -delete’, cwd=app_dir)
    File “/home/frappe/bench-repo/bench/utils.py”, line 140, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: find . -name "
    .pyc" -delete

Looks like you are running the update as root. Rather use user frappe

1 Like

No, i have tried that also.
switch to the frappe user and bench update . same error.

try (as frappe): bench update --reset

1 Like

Still getting same error.

this implies that an open process is preventing you from deleting/updating files.
try stopping all the relevant processes and then rerun the update

how do i stop that relevant process ??

I Have manually deleted that two files, now getting this Error

Already up-to-date.
INFO:bench.utils:find . -name “*.pyc” -delete
Traceback (most recent call last):
File “/usr/bin/bench”, line 9, in
load_entry_point(‘bench==4.1.0’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 58, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 71, in _update
pull_all_apps(bench_path=bench_path, reset=reset)
File “/home/frappe/bench-repo/bench/app.py”, line 162, in pull_all_apps
remote = get_remote(app)
File “/home/frappe/bench-repo/bench/app.py”, line 211, in get_remote
remote = contents.splitlines()[0].split()[0]
IndexError: list index out of range