Issue while creating sales invoice from template

getting below error while creating sales invoice File “apps/erp/erp/dairy_erp/doctype/bulk_upload_queue/”, line 164, in generic_creation
File “apps/frappe/frappe/model/”, line 301, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/”, line 323, in _save
if self.get(“__islocal”) or not self.get(“name”):
File “apps/frappe/frappe/model/”, line 270, in insert
File “apps/frappe/frappe/model/”, line 498, in db_insert
File “apps/frappe/frappe/database/”, line 209, in sql
self._cursor.execute(query, values)
File “env/lib/python3.10/site-packages/pymysql/”, line 147, in execute
result = self._query(query)
File “env/lib/python3.10/site-packages/pymysql/”, line 309, in _query
File “env/lib/python3.10/site-packages/pymysql/”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.10/site-packages/pymysql/”, line 775, in _read_query_result
File “env/lib/python3.10/site-packages/pymysql/”, line 1156, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.10/site-packages/pymysql/”, line 725, in _read_packet
File “env/lib/python3.10/site-packages/pymysql/”, line 221, in raise_for_error
File “env/lib/python3.10/site-packages/pymysql/”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1062, “Duplicate entry ‘powder’ for key ‘PRIMARY’”)

basically you are adding powder which is key of database basically primary key , check if any record exist for entry powder, maybe you are using powder as item-code ?

powder is item and item code. just creating SI for this item

use something unieque as item code anything different than powder i prefer some kind of naming series