Cannot update the ERPnext

Cannot update Bench

abc@abc-com:~$ bench update
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/”, line 40, in cli
File “/usr/local/lib/python3.6/dist-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.6/dist-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.6/dist-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.6/dist-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/”, line 32, in update’.’)
File “/home/frappe/.bench/bench/patches/”, line 21, in run
result = execute(bench_path)
File “/home/frappe/.bench/bench/patches/v3/”, line 7, in execute
frappe_branch = get_current_branch(‘frappe’, bench_path)
File “/home/frappe/.bench/bench/”, line 281, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/home/frappe/.bench/bench/”, line 367, in get_cmd_output
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
File “/usr/lib/python3.6/”, line 356, in check_output
File “/usr/lib/python3.6/”, line 423, in run
with Popen(*popenargs, **kwargs) as process:
File “/usr/lib/python3.6/”, line 729, in init
restore_signals, start_new_session)
File “/usr/lib/python3.6/”, line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘./apps/frappe’: ‘./apps/frappe’

Execute the command from your frappe-bench directory.

1 Like

I had to navigate to the frappe-bench directory and change the default user to bench default user by

sudo su - [user]

and then use the command

bench update

All bench commands are supposed to be run in the frappe-bench directory by the frappe user.

1 Like