Not able to install custom app developed 2 years ago No Module Named error

I am trying to install a custom app i made 2 years ago to extend some functionality.
It is working on a production server with erpnext v10
Now I have setup development bench with erpnext and frappe v10.

But when i install the said app, i am getting ImportError: No module named collections_management
Full disclosure, Python is not my core competency. It must be something really basic, but I am not able to figure out the what the problem is. Help is highly appreciated.
Thanks

  Traceback (most recent call last):
  File "/home/frappe/tcst-bench/apps/frappe/frappe/utils/bench_helper.py", line 64, in get_app_commands
    app_command_module = importlib.import_module(app + '.commands')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named collections_management.commands
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/tcst-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
    main()
  File "/home/frappe/tcst-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/tcst-bench/env/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/tcst-bench/env/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/tcst-bench/env/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/tcst-bench/env/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/tcst-bench/env/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/tcst-bench/env/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/tcst-bench/env/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/tcst-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/tcst-bench/apps/frappe/frappe/commands/site.py", line 162, in install_app
    frappe.init(site=site)
  File "/home/frappe/tcst-bench/apps/frappe/frappe/__init__.py", line 158, in init
    setup_module_map()
  File "/home/frappe/tcst-bench/apps/frappe/frappe/__init__.py", line 872, in setup_module_map
    for module in get_module_list(app):
  File "/home/frappe/tcst-bench/apps/frappe/frappe/__init__.py", line 746, in get_module_list
    return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), "modules.txt"))
  File "/home/frappe/tcst-bench/apps/frappe/frappe/__init__.py", line 704, in get_module
    return importlib.import_module(modulename)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named collections_management

Please check the modules.txt file in apps/frappe/frappe and removing the “collections_management” entry might fix this

there is no collections_management in apps/frappe/frappe/modules.txt.
That file has a list of modules in the frappe app.

Is it a part of the custom app?

The error in the first line states that there is some app which is looking for this module but cant find it.

Someplace it’s being called but python is unable to find the module (python module).

Maybe trying a global search in your app code might reveal something. The traceback does not show from where it is called…

Yes collections_management is the name of the custom app, I realize now that it was stupid to not mention that in the original post. Below is the Github Repo.

BUMP! :neutral_face:

Update setup file of custom app as latest frappe version (you can simply create a new app and copy setup file after changing app details to your old custom app ).

Tried as you said, I am still getting the same error

Please try to uninstall and re-install your custom app:

bench remove-from-installed-apps <app_name>
bench --site <sitename> uninstall-app <app_name>

Same error whatever I do.
Can you try installing from that repo on your server.