Try ERPNext Buy Support Partners Foundation

pymysql.err.IntegrityError: (1062, "Duplicate entry 'e66672e8b1' for key 'PRIMARY'")

I am trying to create a BOM using the file import uitility and the import is erroring out with this message “pymysql.err.IntegrityError: (1062, “Duplicate entry ‘e66672e8b1’ for key ‘PRIMARY’”)”

I have a single line in the import file .

I attempted to create the BOM via the UI and encounter the same error



You can find the record by executing this query.

SELECT  `name` FROM `YourDatabase`.`tabBOM Item` WHERE `name` = 'e66672e8b1'

Please take a backup before to execute the below query (highly recommended)

DELETE FROM `YourDatabase`.`tabBOM Item` WHERE `name` = 'e66672e8b1'

Thank you for your response.

I am fairly new to frappe / erpnext. Where do i run these database commands ?