Hi, I’m running into problems when trying to migrate an erpnext instance where I’ve previously installed a custom app.
The traceback log is given below:
File "/usr/lib/python2.7/runpy.py", line 174, 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 "/opt/bench/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module> main() File "/opt/bench/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main click.Group(commands=commands)(prog_name='bench') File "/opt/bench/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/opt/bench/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/opt/bench/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/bench/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/bench/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/bench/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/opt/bench/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 "/opt/bench/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func ret = f(frappe._dict(ctx.obj), *args, **kwargs) File "/opt/bench/frappe-bench/apps/frappe/frappe/commands/site.py", line 228, in migrate migrate(context.verbose, rebuild_website=rebuild_website) File "/opt/bench/frappe-bench/apps/frappe/frappe/migrate.py", line 42, in migrate sync_fixtures() File "/opt/bench/frappe-bench/apps/frappe/frappe/utils/fixtures.py", line 24, in sync_fixtures ignore_links=True, overwrite=True) File "/opt/bench/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py", line 56, in import_doc frappe.modules.import_file.import_file_by_path(f, data_import=True, force=True, pre_process=pre_process, reset_permissions=True) File "/opt/bench/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 65, in import_file_by_path ignore_version=ignore_version, reset_permissions=reset_permissions) File "/opt/bench/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 133, in import_doc doc.insert() File "/opt/bench/frappe-bench/apps/frappe/frappe/model/document.py", line 236, in insert raise e frappe.exceptions.DuplicateEntryError: (u'Custom Field', u'Program Enrollment-_party', IntegrityError(1062, u"Duplicate entry 'Program Enrollment-_party' for key 'PRIMARY'"))
Can anyone tell me what’s wrong with my app? It seems the migrate fails when it tries to sync the fixtures.