Error, fails, duplicate message


I installed a fresh copy in a nonEnglish language. a couple of times failed until finally installed after an update.
In all those times I was trying to define a user “a@a.a” as user.
this time that it is successfully installed,it gives duplication exception as follows on the run time.
The question is how to solve this?
Thank you in advance for your great help.

Traceback (most recent call last):
File “/home/gelareh/frappe-bench/apps/frappe/frappe/model/”, line 303, in db_insert
), list(d.values()))
File “/home/gelareh/frappe-bench/apps/frappe/frappe/”, line 173, in sql
self._cursor.execute(query, values)
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 165, in execute
result = self._query(query)
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 321, in _query
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 860, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 1061, in _read_query_result
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 1349, in read
first_packet = self.connection._read_packet()
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 1018, in _read_packet
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 384, in check_error
File “/home/gelareh/frappe-bench/env/lib/python3.5/site-packages/pymysql/”, line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1062, “Duplicate entry ‘a@a.a’ for key ‘PRIMARY’”)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/gelareh/frappe-bench/apps/frappe/frappe/”, line 62, in application
response = frappe.handler.handle()
File “/home/gelareh/frappe-bench/apps/frappe/frappe/”, line 22, in handle
data = execute_cmd(cmd)
File “/home/gelareh/frappe-bench/apps/frappe/frappe/”, line 53, in execute_cmd
return, **frappe.form_dict)
File “/home/gelareh/frappe-bench/apps/frappe/frappe/”, line 940, in call
return fn(*args, **newargs)
File “/home/gelareh/frappe-bench/apps/frappe/frappe/chat/doctype/chat_profile/”, line 85, in create = True)
File “/home/gelareh/frappe-bench/apps/frappe/frappe/model/”, line 256, in save
return self._save(*args, **kwargs)
File “/home/gelareh/frappe-bench/apps/frappe/frappe/model/”, line 279, in _save
File “/home/gelareh/frappe-bench/apps/frappe/frappe/model/”, line 233, in insert
raise e
File “/home/gelareh/frappe-bench/apps/frappe/frappe/model/”, line 230, in insert
File “/home/gelareh/frappe-bench/apps/frappe/frappe/model/”, line 314, in db_insert
raise frappe.DuplicateEntryError(self.doctype,, e)
frappe.exceptions.DuplicateEntryError: (‘Chat Profile’, ‘a@a.a’, IntegrityError(1062, “Duplicate entry ‘a@a.a’ for key ‘PRIMARY’”))

Hi @gelareh,

having the same issue, I believe it is this here: Bench update issue on production branch - 12/03

1 Like