How to install any new app in site?

Hello,

Right now i am trying to install my custom application in my site, but it gives me an error.

This is my error log:

frappe.exceptions.DuplicateEntryError: (u’Module Def’, u’Data Migration Tool’, IntegrityError(1062, u"Duplicate entry ‘Data Migration Tool’ for key ‘PRIMARY’"))

How can i resolve this issue?

Thanks in advance.

Any idea about this error?

Can you try:-
Create new site:- bench new-site example1.com
bench use example1.com
bench install-app App_name

Is this application already installed ???

if yes then uninstall the app and then install…
check bench cheatsheet and select the right command from there. Make sure you have backup of code and db before you try anything…

also check modules.txt file in sites folder if you have this module already there…

Regards,

Parth Joshi