How can I handle this error when I start bench on Mac

Traceback (most recent call last):
File “/opt/homebrew/bin/bench”, line 8, in
sys.exit(cli())
File “/opt/homebrew/lib/python3.10/site-packages/bench/cli.py”, line 70, in cli
cmd_from_sys = get_cmd_from_sysargv()
File “/opt/homebrew/lib/python3.10/site-packages/bench/utils/init.py”, line 554, in get_cmd_from_sysargv
if sys_argv.index(arg) == 0 and arg in Bench(“.”).apps:
File “/opt/homebrew/lib/python3.10/site-packages/bench/bench.py”, line 67, in init
self.apps = BenchApps(self)
File “/opt/homebrew/lib/python3.10/site-packages/bench/bench.py”, line 174, in init
self.initialize_apps()
File “/opt/homebrew/lib/python3.10/site-packages/bench/bench.py”, line 281, in initialize_apps
self.apps.remove(“frappe”)
ValueError: list.remove(x): x not in list

Even I got same error after changing the version of frappe and now i couldn’t be able to perform any of the bench commands.

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/home/frappe_revoh/.local/lib/python3.10/site-packages/bench/cli.py”, line 74, in cli
cmd_from_sys = get_cmd_from_sysargv()
File “/home/frappe_revoh/.local/lib/python3.10/site-packages/bench/utils/init.py”, line 554, in get_cmd_from_sysargv
if sys_argv.index(arg) == 0 and arg in Bench(“.”).apps:
File “/home/frappe_revoh/.local/lib/python3.10/site-packages/bench/bench.py”, line 67, in init
self.apps = BenchApps(self)
File “/home/frappe_revoh/.local/lib/python3.10/site-packages/bench/bench.py”, line 175, in init
self.initialize_apps()
File “/home/frappe_revoh/.local/lib/python3.10/site-packages/bench/bench.py”, line 282, in initialize_apps
self.apps.remove(“frappe”)
ValueError: list.remove(x): x not in list

Uninstall Current Bench and Install it with

sudo -H pip3 install frappe-bench

did it work buddy ?