Bench switch-to-develop issue

Hey guys,

I try to switch to the developmode and get this traceback!

bench@erpnext:/home/bench/frappe-bench$ bench switch-to-develop

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/opt/bench/.local/lib/python3.8/site-packages/bench/cli.py”, line 41, in cli
bench_command()
File “/opt/bench/.local/lib/python3.8/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/opt/bench/.local/lib/python3.8/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/opt/bench/.local/lib/python3.8/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/.local/lib/python3.8/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/bench/.local/lib/python3.8/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/bench/.local/lib/python3.8/site-packages/bench/commands/update.py”, line 56, in switch_to_develop
switch_to_develop(apps=[‘frappe’, ‘erpnext’])
File “/opt/bench/.local/lib/python3.8/site-packages/bench/app.py”, line 423, in switch_to_develop
switch_branch(‘develop’, apps=apps, bench_path=bench_path, upgrade=upgrade)
File “/opt/bench/.local/lib/python3.8/site-packages/bench/app.py”, line 381, in switch_branch
repo = git.Repo(app_dir)
File “/opt/bench/.local/lib/python3.8/site-packages/git/repo/base.py”, line 183, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/bench/frappe-bench/apps/frappe

please help!

best regards