Error when import sales invoice (without Specific Error :( )

I have sales invoice with data (4k sales invoice), before 10 days I uploaded and all sales invoice is uploaded successfully, but when I add another sales invoice to Excel file now I faced this Error, but I can’t solve it, can any one help me in this problem?

Any Help ?

Did you notice a “Show Traceback” button anywhere?

Yes Martin, and show me the following error

Traceback (most recent call last):
  File "apps/frappe/frappe/core/doctype/data_import/", line 125, in import_data
    doc = self.process_doc(doc)
  File "apps/frappe/frappe/core/doctype/data_import/", line 191, in process_doc
    return self.insert_record(doc)
  File "apps/frappe/frappe/core/doctype/data_import/", line 210, in insert_record
  File "apps/frappe/frappe/model/", line 280, in insert
  File "apps/frappe/frappe/model/", line 407, in db_insert
  File "apps/frappe/frappe/database/", line 174, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.7/site-packages/pymysql/", line 148, in execute
    result = self._query(query)
  File "env/lib/python3.7/site-packages/pymysql/", line 310, in _query
  File "env/lib/python3.7/site-packages/pymysql/", line 548, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "env/lib/python3.7/site-packages/pymysql/", line 775, in _read_query_result
  File "env/lib/python3.7/site-packages/pymysql/", line 1156, in read
    first_packet = self.connection._read_packet()
  File "env/lib/python3.7/site-packages/pymysql/", line 725, in _read_packet
  File "env/lib/python3.7/site-packages/pymysql/", line 221, in raise_for_error
  File "env/lib/python3.7/site-packages/pymysql/", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1062, "Duplicate entry 'Dermeso Gluta-1200 / vial 5 ml X 5' for key 'PRIMARY'")```

Does that not help at all?

1 Like

Kindly, can you explain more?
this is one of my Item Dermeso Gluta-1200 / vial 5 ml X 5

any help?

It will not permit inserting a doc that has already been inserted.

you mean Sales Invoice doc or Item doc?

You have all the information you need to solve the problem yourself.