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/importer.py", line 125, in import_data
    doc = self.process_doc(doc)
  File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 191, in process_doc
    return self.insert_record(doc)
  File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 210, in insert_record
    new_doc.insert()
  File "apps/frappe/frappe/model/document.py", line 280, in insert
    d.db_insert()
  File "apps/frappe/frappe/model/base_document.py", line 407, in db_insert
    list(d.values()),
  File "apps/frappe/frappe/database/database.py", line 174, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.7/site-packages/pymysql/cursors.py", line 148, in execute
    result = self._query(query)
  File "env/lib/python3.7/site-packages/pymysql/cursors.py", line 310, in _query
    conn.query(q)
  File "env/lib/python3.7/site-packages/pymysql/connections.py", line 548, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "env/lib/python3.7/site-packages/pymysql/connections.py", line 775, in _read_query_result
    result.read()
  File "env/lib/python3.7/site-packages/pymysql/connections.py", line 1156, in read
    first_packet = self.connection._read_packet()
  File "env/lib/python3.7/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "env/lib/python3.7/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "env/lib/python3.7/site-packages/pymysql/err.py", 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.

Can you please provide the Import Template of GST Sales Invoices