App install failed in the middle of installation

Hey Everyone,

I ran into an issue.

I tried to install my own custom app on a newly created site and it throws me an error of:

pymysql.err.InternalError: (1069, u’Too many keys specified; max 64 keys allowed’)

After debugging I found out that system is trying to run an ALTER query like below

ALTER TABLE tabDeleted Document MODIFY

I found out it tried to create some indexes on table tabDeleted Document but it couldn’t.

My first question is, can someone explains this behaviour?

Secondly, when I tried to install the app again, it gives me primary key duplication error because some of the data was already migrate during first installation attempt.

is there a way to smoothly install an app which encounters error during isntallation?

Did you find any solution?

Ah yes I found out a workaround for this.

Firstly I would suggest you to move to master branch of frappe and erpnext if possible.

Secondly, you’ve have to manually delete indexes from database tables which are creating problems.

And last delete the site and install everything from scratch. :slight_smile: