English 中文(简体)
• 如何解决重复录用错误,同时在喷洒中安装包件/模块,例如不白_合规模块
原标题:How to solve duplicate entry error while installing packages/modules in erpnext, eg indain_compliance module

我一直在努力在我旁遮普图 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

最佳回答

我正面临类似的错误,我解决的方式是找到我的包裹并删除这些包裹,就你而言,如果这样做的话,那么你我方言的几句是站不住脚的。

mysql -u root -p
SHOW DATABASES;
USE database_name_here;
SHOW TABLES;

之后

SELECT * FROM `tabModule Def`;
DELETE FROM `tabModule Def` WHERE app =  Indian Compliance ;

之后 the install commands should run!!

问题回答

We have to change the command as DELETE FROM tabModule Def WHERE app_name = india_iompliance ;

Regards, Sudhir.





相关问题
Add a changing icon to Ubuntu Panel

What would be the most simple way of adding and changing an icon in the Ubuntu (Gnome) Panel? I m looking for something as simple as shell scripting, but I m not restricted to that. Will write a ...

Configuring kernel

After create a new system call, how to update the kernel? I tried these lines, make-kpkg clean fakeroot make-kpkg -initrd -append-to-version=-custom kernel_image kernel_headers But Ubuntu asked me ...

save Exceptions to file in python

I want to save all following Exceptions in a file. The reason why I need this is because the IDLE for python 3.1.1 in Ubuntu raises an Exception at calltipps, but close to fast, that it isn t readble. ...

How can i monitor system statistics in kubuntu using Java?

i am doing a project related to configuration and memory analyzer for kubuntu. i want to display the system statistics information like CPU usage, RAM usage and proceses etc. graphically using an ...

How to pass "--external-locking" for mysqld in Ubuntu

I would like to start my mysql server with the --external-locking option. As mysqld is run by the /etc/init.d/mysql script ubuntu (karmic), I guess that s where I should set this "--external-locking" ...

"g++" and "c++" compiler

I just found on my Ubuntu, there are two different C++ compilers: /usr/bin/g++ and /usr/bin/c++. I am not familiar with the latter, but man c++ just jumps to the manpage of gcc. I wonder what is their ...

热门标签