I can not use bench --version in home/myusername folder

I can not use bench --version in my home/myusername folder but I can use that command in home/myusername/trial it works in that directory.

I use wsl ubuntu.

i got this error in home/myusername
“Traceback (most recent call last):
File “/home/enginc4n/.local/bin/bench”, line 8, in
sys.exit(cli())
^^^^^
File “/home/enginc4n/.local/lib/python3.12/site-packages/bench/cli.py”, line 74, in cli
cmd_from_sys = get_cmd_from_sysargv()
^^^^^^^^^^^^^^^^^^^^^^
File “/home/enginc4n/.local/lib/python3.12/site-packages/bench/utils/init.py”, line 581, in get_cmd_from_sysargv
if sys_argv.index(arg) == 0 and arg in Bench(”.“).apps:
^^^^^^^^^^
File “/home/enginc4n/.local/lib/python3.12/site-packages/bench/bench.py”, line 67, in init
self.apps = BenchApps(self)
^^^^^^^^^^^^^^^
File “/home/enginc4n/.local/lib/python3.12/site-packages/bench/bench.py”, line 177, in init
self.initialize_apps()
File “/home/enginc4n/.local/lib/python3.12/site-packages/bench/bench.py”, line 284, in initialize_apps
self.apps.remove(“frappe”)
ValueError: list.remove(x): x not in list”

Getting same error.

Did

 sudo pip3 uninstall bench
 sudo pip3 install git+https://github.com/frappe/bench.git@v5.22.9
 bench --version
 sudo pip3 uninstall bench
 sudo pip3 install git+https://github.com/frappe/bench.git@v5.18.0
 bench --version

for each bench --version, getting:

~$ bench --version
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bench/cli.py", line 74, in cli
    cmd_from_sys = get_cmd_from_sysargv()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bench/utils/__init__.py", line 554, in get_cmd_from_sysargv
    if sys_argv.index(arg) == 0 and arg in Bench(".").apps:
                                           ^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bench/bench.py", line 67, in __init__
    self.apps = BenchApps(self)
                ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bench/bench.py", line 175, in __init__
    self.initialize_apps()
  File "/usr/local/lib/python3.11/dist-packages/bench/bench.py", line 282, in initialize_apps
    self.apps.remove("frappe")
ValueError: list.remove(x): x not in list

what could be the issue, and how solution be found?