check your ID before inserting. It should be unique.
Consider the below example.
ID | Name |
---|---|
CA1 | Raja |
CA1 | Rani |
CA2 | Rajni |
In the above example. Raja and Rani have same ID so not possible to import.
Traceback (most recent call last):
File “apps/frappe/frappe/model/base_document.py”, line 550, in db_insert
frappe.db.sql(
File “apps/frappe/frappe/database/database.py”, line 234, in sql
self._cursor.execute(query, values)
File “env/lib/python3.10/site-packages/pymysql/cursors.py”, line 153, in execute
result = self._query(query)
File “env/lib/python3.10/site-packages/pymysql/cursors.py”, line 322, in _query
conn.query(q)
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 558, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 822, in _read_query_result
result.read()
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 1200, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 772, in _read_packet
packet.raise_for_error()
File “env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1062, “Duplicate entry ‘0’ for key ‘custom_customer_series’”)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “apps/frappe/frappe/core/doctype/data_import/importer.py”, line 146, in import_data
doc = self.process_doc(doc)
File “apps/frappe/frappe/core/doctype/data_import/importer.py”, line 240, in process_doc
return self.insert_record(doc)
File “apps/frappe/frappe/core/doctype/data_import/importer.py”, line 259, in insert_record
new_doc.insert()
File “apps/frappe/frappe/model/document.py”, line 296, in insert
self.db_insert(ignore_if_duplicate=ignore_if_duplicate)
File “apps/frappe/frappe/model/base_document.py”, line 581, in db_insert
self.show_unique_validation_message(e)
File “apps/frappe/frappe/model/base_document.py”, line 643, in show_unique_validation_message
raise frappe.UniqueValidationError(self.doctype, self.name, e)
frappe.exceptions.UniqueValidationError: (‘Customer’, ‘eee00007’, IntegrityError(1062, “Duplicate entry ‘0’ for key ‘custom_customer_series’”))
i did not have customer with This name eee00007
In Frappe Version 14 I will try the following ways,
- if you have access to mariadb, check the table and delete it. (Risky. Ensure before delete)
- Do you able to Add Customer in desk?
I believe, the easiest solution is to switch Customer Naming By to Naming Series under Selling Settings
“/app/selling-settings”
i tried it but still issue
then i change the Naming Rule in customer also and it is worked
why delete it?
i find the right way to fix the issue i post it then made that
Ok, you still did not get my point.
any case if you want to explain it
here you are