Try ERPNext Buy Support Partners Foundation

Plaid Error - Throws a Duplicate Name issue when adding Bank Accounts

Hi there, I’ve tried integrating our company’s bank accounts with Plaid. We use two banks, RBC, and TD. Our Bank Account List, and our Bank List, is clear and empty. Somehow though, on either connection with RBC or TD, we get the following error after selecting the Company prompt once authenticated. It says that the bank account already exists, and it’s a duplicate name, then it never progresses.

Any idea why this could be?

Thank you!

Traceback (most recent call last): File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/base_document.py", line 325, in db_insert ), list(d.values())) 
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/database/database.py", line 156, in sql self._cursor.execute(query, values) File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) 
File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q)
File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 517, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 732, in _read_query_result result.read() 
File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 1075, in read first_packet = self.connection._read_packet() 
File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 684, in _read_packet packet.check_error() 
File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) 
File "/home/ubuntu/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.IntegrityError: (1062, "Duplicate entry 'Chequing - RBC Royal Bank' for key 'PRIMARY'") During handling of the above exception, another exception occurred: Traceback (most recent call last): 
File "/home/ubuntu/frappe-bench/apps/erpnext/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py", line 99, in add_bank_accounts new_account.insert() 
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 248, in insert raise e 
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 245, in insert self.db_insert() 
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/base_document.py", line 335, in db_insert raise frappe.DuplicateEntryError(self.doctype, self.name, e) frappe.exceptions.DuplicateEntryError: ('Bank Account', 'Chequing - RBC Royal Bank', IntegrityError(1062, "Duplicate entry 'Chequing - RBC Royal Bank' for key 'PRIMARY'"))