Help with Updating bench

Hello Team

I am trying to update my bench but i am stuck on these error, i will appreciate a swift help on running a successful update

ubuntu@ip-172-31-54-98:~$ 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/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/bench/commands/update.py”, line 30, in update
patches.run(bench_path=’.’)
File “/home/frappe/.bench/bench/patches/init.py”, line 21, in run
result = execute(bench_path)
File “/home/frappe/.bench/bench/patches/v3/celery_to_rq.py”, line 7, in execute
frappe_branch = get_current_branch(‘frappe’, bench_path)
File “/home/frappe/.bench/bench/app.py”, line 171, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/home/frappe/.bench/bench/utils.py”, line 321, in get_cmd_output
return subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=open(os.devnull, ‘wb’)).strip()
File “/usr/lib/python2.7/subprocess.py”, line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory: ‘./apps/frappe’

You need to execute bench update command within the frappe-bench directory, while I see that you are trying to execute it in your user home directory.

Thank you for your prompt response but i am unable to navigate to the frappe-bench directory. Can you please help with this…

Thank you for your prompt response but i am unable to navigate to the frappe-bench directory. Can you please help with this…

frappe-bench should be located in user’s home directory. So it should be there either in ubuntu users home directory as per the screenshot that you have shown, or else in frappe user directory, if you installed your ERPNext instance using the installation script.

Thanks Shreyasp

i seem to still have same error code, what should i do

<img src="/uploads/default/original/2X/f/f5607e7ec8c8d2129fcc18b537f0717566683d34.png" width=“613” height=“500”

try

sudo chmod 666 /home/frappe/frappe-bench/logs/bench.log

1 Like

try it again

my first post was wrong
sudo chmod 666 /home.frappe/frappe-bench/logs/bench.log

use this
sudo chmod 666 /home/frappe/frappe-bench/logs/bench.log

Thanks Claily

but nothing happen i got returned to the directory

You need to bench update again

You have permission problem on your files

the command earlier gives permission to
bench.log

Now you have problems with patches.txt
using this command will also fix the permission for that file

sudo chmod 666 /home/frappe/frappe-bench/patches.txt

or you could try

chmod -R 666 /home/frappe/frappe-bench
this will give permissions to frappe-bench diectory

Great Claily, here is another error message

This post will help you on this

Thank you Claily

I seem to have permission issue all over and i am trying to run this script from the recommended post but i am stuck

#!/bin/bash
chown -R frappe:frappe /home/frappe/.bench
chown -R frappe:frappe /home/frappe/frappe-bench/apps/frappe
chown -R frappe:frappe /home/frappe/frappe-bench/apps/erpnext
cd /home/frappe/frappe-bench
bench update

Hey Claily

Hoping to hear from you…

Warm regards

Hi , @EnSeal ,

Try cd frappe-bench then bench update

Thanks Ragav

See error. what should i do?