Error while setup erpnext

I cloned erpnext source and created one user and then commited that code in my repositary now i am trying to setup erpnext from there.and i am receiving below error

frappe.exceptions.DuplicateEntryError: (u’Module Def’, u’Accounts’, IntegrityError(1062, “Duplicate entry ‘Accounts’ for key ‘PRIMARY’”))

have i made any mistake ? i have not changed code in any module

Erpnext version 7.2.29
Frappe version 7.2.29

Share the full trace.

Installing erpnext…
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 152, in install_app
_install_app(app, verbose=context.verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 130, in install_app
add_module_defs(name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 326, in add_module_defs
d.save(ignore_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 223, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 200, in insert
self.db_insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 296, in db_insert
), d.values())
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
frappe.exceptions.DuplicateEntryError: (u’Module Def’, u’Accounts’, IntegrityError(1062, “Duplicate entry ‘Accounts’ for key ‘PRIMARY’”))

The ERPNext app is already installed on your site. if you are creating the new site then use the bench --site new_site_name install-app erpnext.

it will install the erpnext site in the new site instead of the site available in current_site.txt

Thanks,
Makarand

@makarand_b i tried to install on fresh site but after successfull setup it is not redirect me to desk and showing error message as EMPTY_RESPONSE (in console), Validation Error & There were errors.

1 Like

@makarand_b i tried to make my seprate repo for erpnext and clone from there. i am using frappe from your repositary.

@Hardik_Mehta,

If you are creating a new site please try to reinstall the site it seems the user is already created in site.

use bench --site your_site_name reinstall

Thanks,
Makarand

@makarand_b still not working.

Gracias, funciono…