I have an complected issue.
First i was getting error on file upload. So i looked for solution and i found solution that i need to run
bench switch-to-master
i did this after that is asked me to run bench --update.
When i tried this it gave me error
You should not run this command as root
Because i was using sudo. So i tried too install without sudo. Then i got permission error.
Collecting python-crontab (from bench==4.1.0)
Exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line 342, in run
requirement_set.prepare_files(finder)
File “/usr/lib/python2.7/dist-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/usr/lib/python2.7/dist-packages/pip/req/req_set.py”, line 554, in _prepare_file
require_hashes
File “/usr/lib/python2.7/dist-packages/pip/req/req_install.py”, line 281, in populate_link
self.link = self._wheel_cache.cached_wheel(self.link, self.name)
File “/usr/lib/python2.7/dist-packages/pip/wheel.py”, line 68, in cached_wheel
self._cache_dir, link, self._format_control, package_name)
File “/usr/lib/python2.7/dist-packages/pip/wheel.py”, line 129, in cached_wheel
wheel_names = os.listdir(root)
OSError: [Errno 13] Permission denied: ‘/root/.cache/pip/wheels/45/c2/12/4f9e435a355df948f562120991107677bf2dce1bb86b18e751’
So i am stuck bench command is not working because it is installed as root user. And normal user unable to install bench.
Please provide solution for issue.
I was doing like this and it was working before. But after switching to master it is not work anymore. Now if use sudo with any command it gives me error
I was doing like this and it was working before. But after switching to master it is not work anymore. Now if use sudo with any command it gives me error
I think i have to reinstall it. But i don’t prefer it.
I have pass previous issue but got new one on bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
error: cannot open .git/FETCH_HEAD: Permission denied
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/erpuser/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/erpuser/bench/bench/commands/update.py”, line 36, in update
update_bench()
File “/home/erpuser/bench/bench/utils.py”, line 260, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/erpuser/bench/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull
Found the solution. bench was installed in the current user but. current user was not in the bash.
Example:-
Username:- erpuser
when i was logged in with erp user and run command.