Unable to install or uninstall app getting error module not found

I installed a custom app called raven (https://github.com/The-Commit-Company/Raven)
then got this error


but still everything worked fine, when i installed another custom app(https://github.com/leam-tech/frappe_telegram) for integrating telegram
then the installation is not perfect

so I uninstalled the app and also unistalled raven and then got this error
for every bench command related to apps like
bench list-apps
bench --site site_name install-app app_name
bench --site site_name uninstall-app app_name
getting this error
how to resolve it? and also how frappe deals with listing of apps and modules
are their any resources to learn about frappe core functionality