ModuleNotFoundError: No module named 'hrms'

Yes, of course, I have tried uninstalling HRMS and then reinstalling it. but still not worked…

Try these to remove

  1. bench --site [site-name] uninstall-app [app-name]
    
  2. bench remove-app [app_name] --force
    
  1. bench setup requirements.
    
  2. bench build
    
  3. bench migrate
    

I encountered an error when I used the command: bench setup requirements

error:
ERROR: /home/frappe/frappe-bench/apps/frappe
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/commands/setup.py”, line 230, in setup_requirements
bench.setup.requirements(apps=apps)
File “/usr/local/lib/python3.11/site-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/bench.py”, line 464, in requirements
app = App(path_to_app, bench=self.bench, to_clone=False).install(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 185, in init
super().init(name, branch, *args, **kwargs)
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 85, in init
self.setup_details()
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 101, in setup_details
self._setup_details_from_mounted_disk()
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 119, in _setup_details_from_mounted_disk
self.git_repo = git.Repo(self.mount_path)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/git/repo/base.py”, line 289, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/frappe/frappe-bench/apps/frappe
INFO: A newer version of bench is available: 5.22.6 → 5.22.9

cd /home/frappe/frappe-bench/apps/frappe

then

git status

share the results

git status :
On branch main
Your branch and ‘origin/main’ have diverged,
and have 1417 and 1 different commits each, respectively.
(use “git pull” to merge the remote branch into yours)

Changes not staged for commit:
(use “git add/rm …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
modified: pwd.yml

Untracked files:
(use “git add …” to include in what will be committed)
docker-helper.yml
site_config.json
tmp/

no changes added to commit (use “git add” and/or “git commit -a”)

was changese to my pwd.yml file."…set-default (site name) ; and FRAPPE_SITE_NAME_HEADER: (site name)