subprocess.CalledProcessError: Command 'basename $(git symbolic-ref -q HEAD)' returned non-zero exit status 1

Traceback (most recent call last):
File “/home/naztech/.local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/naztech/bench/bench/”, line 40, in cli
File “/home/naztech/.local/lib/python3.6/site-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/home/naztech/.local/lib/python3.6/site-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/home/naztech/.local/lib/python3.6/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/naztech/.local/lib/python3.6/site-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/naztech/.local/lib/python3.6/site-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/naztech/bench/bench/commands/”, line 53, in update
File “/home/naztech/bench/bench/”, line 427, in validate_branch
branch = get_current_branch(app)
File “/home/naztech/bench/bench/”, line 280, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/home/naztech/bench/bench/”, line 370, 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 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘basename $(git symbolic-ref -q HEAD)’ returned non-zero exit status 1.

A forum search on this should turn up lots of cases and pointers to check out?

And let us know how you fare

1 Like

how can i solve this problem?