我一直在努力在我旁遮普图 vm上安装护卫——合规模块,以便在终端使用以下指挥器在喷口使用:
bench get-app https://github.com/resilient-tech/india-compliance.git
bench install-app india_compliance
但是,由于某种原因,它一度失败了,一只手fold子在家中安装了。
当时对同一指挥部进行再勘测,正出现这一错误:
raise frappe.DuplicateEntryError(self.doctype, self.name, e)
frappe.exceptions.DuplicateEntryError: ( Module Def , GST India , IntegrityError(1062, "Duplicate entry GST India for key PRIMARY "))
但是,后来试图删除双手,但仍然照搬同样的错误代码。
在此之前,我在安装自动取款机时遇到了类似的错误。
Installing erpnext...
An error occurred while installing erpnext: ( Module Def , Accounts , IntegrityError(1062, "Duplicate entry Accounts for key PRIMARY "))
Traceback (most recent call last):
File "apps/frappe/frappe/model/base_document.py", line 510, in db_insert
frappe.db.sql(
File "apps/frappe/frappe/database/database.py", line 229, in sql
self._cursor.execute(query, values)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
result = self._query(query)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
conn.query(q)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
result.read()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1157, in read
first_packet = self.connection._read_packet()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 729, 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 Accounts for key PRIMARY ")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 463, in install_app
_install_app(app, verbose=context.verbose, force=force)
File "apps/frappe/frappe/installer.py", line 291, in install_app
add_module_defs(name, ignore_if_duplicate=force)
File "apps/frappe/frappe/installer.py", line 622, in add_module_defs
d.insert(ignore_permissions=True, ignore_if_duplicate=ignore_if_duplicate)
File "apps/frappe/frappe/model/document.py", line 279, in insert
self.db_insert(ignore_if_duplicate=ignore_if_duplicate)
File "apps/frappe/frappe/model/base_document.py", line 537, in db_insert
raise frappe.DuplicateEntryError(self.doctype, self.name, e)
frappe.exceptions.DuplicateEntryError: ( Module Def , Accounts , IntegrityError(1062, "Duplicate entry Accounts for key PRIMARY "))
我发现的唯一解决办法是建立一个全新的机器! 从零敲碎打中,我曾几次面对过这一错误,这已成为再次创建整个新机器的 has,必须找到办法解决这种错误,例如,从机器上我的舱数据库中删除一些错误,但无法大量提取。
mysql -u root -p
SHOW DATABASES;
USE database_name_here;
SHOW TABLES;
then what to do next how to find the duplicate entry is what i am not able to do