ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

[bench update error] Duplicate entry 'Patient Encounter'


#1

am facing the below error on bench update… what could be the issue here

Traceback (most recent call last):
_ 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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in _
_ main()_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, 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 722, in call_
_ return self.main(*args, **kwargs)_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main_
_ rv = self.invoke(ctx)_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, 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 1066, 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 895, 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 535, 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 25, in func
_ ret = f(frappe.dict(ctx.obj), *args, **kwargs)
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 223, in migrate_
_ migrate(context.verbose, rebuild_website=rebuild_website)_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 39, in migrate_
_ frappe.modules.patch_handler.run_all()_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all_
_ if not run_single(patchmodule = patch):_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single_
_ return execute_patch(patchmodule, method, methodargs)_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch_
_ frappe.get_attr(patchmodule.split()[0] + “.execute”)()_
_ File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 5, in execute_
_ change_healthcare_desktop_icons()_
_ File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 62, in change_healthcare_desktop_icons_
_ “”".format(spec[‘module_name’], spec[‘color’], spec[‘icon’], spec[‘doctype’], spec[‘type’], spec[‘link’], spec[‘label’], spec[‘doctype’]))_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 165, in sql_
_ self.cursor.execute(query)
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 165, in execute_
_ result = self.query(query)
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 321, in query
_ conn.query(q)_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 860, in query_
_ self.affected_rows = self.read_query_result(unbuffered=unbuffered)
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1061, in read_query_result
_ result.read()

_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1349, in read_
_ first_packet = self.connection.read_packet()
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1018, in read_packet
_ packet.check_error()_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 384, in check_error_
_ err.raise_mysql_exception(self.data)
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception_
_ raise errorclass(errno, errval)_
pymysql.err.IntegrityError: (1062, u"Duplicate entry ‘Patient Encounter-ijycob@gmail.com-0’ for key ‘unique_module_name_owner_standard’")


#2

HI FRIENDS

Why am I getting this error on bench update… kindly help…

Patching sites…
Migrating site1.local
Executing erpnext.patches.v11_0.change_healthcare_desktop_icons in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
_ 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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in _
_ main()_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, 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 722, in call_
_ return self.main(*args, **kwargs)_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main_
_ rv = self.invoke(ctx)_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, 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 1066, 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 895, 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 535, 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 25, in func
_ ret = f(frappe.dict(ctx.obj), *args, **kwargs)
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 223, in migrate_
_ migrate(context.verbose, rebuild_website=rebuild_website)_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 39, in migrate_
_ frappe.modules.patch_handler.run_all()_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all_
_ if not run_single(patchmodule = patch):_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single_
_ return execute_pa_y", line 384, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1062, u"Duplicate entry ‘Patient Encounter-ijycob@gmail.com-0’ for key ‘unique_module_name_owner_standard’")tch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 5, in execute
change_healthcare_desktop_icons()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 62, in change_healthcare_desktop_icons
“”".format(spec[‘module_name’], spec[‘color’], spec[‘icon’], spec[‘doctype’], spec[‘type’], spec[‘link’], spec[‘label’], spec[‘doctype’]))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 165, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 165, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 321, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 860, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1061, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1349, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1018, in _read_packet
packet.check_error()
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.p

cant even use my server now…


#3

The error is as below

  > **Successfully uninstalled pip-18.0**

Successfully installed pip-18.1
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
frappe 10.1.1 has requirement dropbox==7.3.1, but you’ll have dropbox 9.1.0 which is incompatible.
Updating node packages…
INFO:bench.utils:yarn install
yarn install v1.6.0
warning You are using Node “7.10.1” which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
[1/4] Resolving packages…
[2/4] Fetching packages…
[3/4] Linking dependencies…
warning “rollup-plugin-vue > @vue/component-compiler@3.4.4” has unmet peer dependency “postcss@>=6.0”.
[4/4] Building fresh packages…
warning Your current version of Yarn is out of date. The latest version is “1.10.1”, while you’re on “1.6.0”.
info To upgrade, run the following command:
$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
Done in 16.85s.
Backing up sites…
Patching sites…
Migrating site1.local
Executing frappe.patches.v11_0.change_email_signature_fieldtype in site1.local (1bd3e0294da19198)
Success: Done in 0.863s
Executing frappe.patches.v10_0.enhance_security in site1.local (1bd3e0294da19198)
Success: Done in 2.79s
Executing frappe.patches.v11_0.multiple_references_in_events in site1.local (1bd3e0294da19198)
Success: Done in 0.352s
Executing frappe.patches.v11_0.set_allow_self_approval_in_workflow in site1.local (1bd3e0294da19198)
Success: Done in 0.262s
Executing erpnext.patches.v8_7.sync_india_custom_fields in site1.local (1bd3e0294da19198)
Success: Done in 0.126s
Executing erpnext.patches.v11_0.refactor_erpnext_shopify #2018-09-07 in site1.local (1bd3e0294da19198)
Success: Done in 0.589s
Executing erpnext.patches.v11_0.make_job_card in site1.local (1bd3e0294da19198)
Success: Done in 1.319s
Executing erpnext.patches.v11_0.redesign_healthcare_billing_work_flow in site1.local (1bd3e0294da19198)
Success: Done in 0.043s
Executing erpnext.patches.v10_0.delete_hub_documents # 12-08-2018 in site1.local (1bd3e0294da19198)
Success: Done in 1.765s
Executing erpnext.patches.v11_0.rename_healthcare_fields in site1.local (1bd3e0294da19198)
Success: Done in 3.308s
Executing erpnext.patches.v11_0.remove_land_unit_icon in site1.local (1bd3e0294da19198)
Success: Done in 0.143s
Executing erpnext.patches.v11_0.add_default_dispatch_notification_template in site1.local (1bd3e0294da19198)
Success: Done in 0.174s
Executing erpnext.patches.v11_0.add_market_segments in site1.local (1bd3e0294da19198)
Success: Done in 0.106s
Executing erpnext.patches.v11_0.add_sales_stages in site1.local (1bd3e0294da19198)
Success: Done in 0.112s
Executing erpnext.patches.v11_0.ewaybill_fields_gst_india in site1.local (1bd3e0294da19198)
Success: Done in 0.013s
Executing erpnext.patches.v11_0.drop_column_max_days_allowed in site1.local (1bd3e0294da19198)
Success: Done in 0.048s
Executing erpnext.patches.v11_0.change_healthcare_desktop_icons in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
** 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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in **
** main()**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, 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 722, in call**
** return self.main(args, kwargs)
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
*
** rv = self.invoke(ctx)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, 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 1066, 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 895, 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 535, 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 25, in _func
*
** ret = f(frappe._dict(ctx.obj), args, kwargs)
** File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 223, in migrate
*
** migrate(context.verbose, rebuild_website=rebuild_website)**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 39, in migrate**
** frappe.modules.patch_handler.run_all()**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all**
** if not run_single(patchmodule = patch):**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single**
** return execute_patch(patchmodule, method, methodargs)**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch**
** frappe.get_attr(patchmodule.split()[0] + “.execute”)()**
** File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 5, in execute**
** change_healthcare_desktop_icons()**
** File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 62, in change_healthcare_desktop_icons**
** “”".format(spec[‘module_name’], spec[‘color’], spec[‘icon’], spec[‘doctype’], spec[‘type’], spec[‘link’], spec[‘label’], spec[‘doctype’]))**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 165, in sql**
** self._cursor.execute(query)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 165, in execute**
** result = self._query(query)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 321, in _query**
** conn.query(q)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 860, in query**
** self._affected_rows = self._read_query_result(unbuffered=unbuffered)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1061, in _read_query_result**
** result.read()**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1349, in read**
** first_packet = self.connection._read_packet()**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1018, in _read_packet**
** packet.check_error()**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 384, in check_error**
** err.raise_mysql_exception(self._data)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception**
** raise errorclass(errno, errval)**
pymysql.err.IntegrityError: (1062, u"Duplicate entry ‘Patient Encounter-ijycob@gmail.com-0’ for key ‘unique_module_name_owner_standard’")
root@vultr:/home/frappe/frappe-bench# ^C
root@vultr:/home/frappe/frappe-bench# bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (5.0.0)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream develop
From https://github.com/frappe/frappe
** * branch develop -> FETCH_HEAD**
Already up-to-date.
INFO:bench.utils:find . -name “*.pyc” -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git pull upstream develop
From https://github.com/frappe/erpnext
** * branch develop -> FETCH_HEAD**
Already up-to-date.
INFO:bench.utils:find . -name “*.pyc” -delete
Updating Python libraries…
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (18.1)
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
frappe 10.1.1 has requirement dropbox==7.3.1, but you’ll have dropbox 9.1.0 which is incompatible.
Updating node packages…
INFO:bench.utils:yarn install
yarn install v1.6.0
warning You are using Node “7.10.1” which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
[1/4] Resolving packages…
success Already up-to-date.
Done in 0.57s.
Backing up sites…
Patching sites…
Migrating site1.local
Executing erpnext.patches.v11_0.change_healthcare_desktop_icons in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
** 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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in **
** main()**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, 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 722, in call**
** return self.main(args, kwargs)
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
*
** rv = self.invoke(ctx)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, 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 1066, 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 895, 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 535, 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 25, in _func
*
** ret = f(frappe._dict(ctx.obj), args, kwargs)
** File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 223, in migrate
*
** migrate(context.verbose, rebuild_website=rebuild_website)**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 39, in migrate**
** frappe.modules.patch_handler.run_all()**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all**
** if not run_single(patchmodule = patch):**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single**
** return execute_patch(patchmodule, method, methodargs)**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch**
** frappe.get_attr(patchmodule.split()[0] + “.execute”)()**
** File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 5, in execute**
** change_healthcare_desktop_icons()**
** File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v11_0/change_healthcare_desktop_icons.py”, line 62, in change_healthcare_desktop_icons**
** “”".format(spec[‘module_name’], spec[‘color’], spec[‘icon’], spec[‘doctype’], spec[‘type’], spec[‘link’], spec[‘label’], spec[‘doctype’]))**
** File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 165, in sql**
** self._cursor.execute(query)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 165, in execute**
** result = self._query(query)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 321, in _query**
** conn.query(q)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 860, in query**
** self._affected_rows = self._read_query_result(unbuffered=unbuffered)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1061, in _read_query_result**
** result.read()**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1349, in read**
** first_packet = self.connection._read_packet()**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1018, in _read_packet**
** packet.check_error()**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 384, in check_error**
** err.raise_mysql_exception(self._data)**
** File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception**
** raise errorclass(errno, errval)**
pymysql.err.IntegrityError: (1062, u"Duplicate entry ‘Patient Encounter-ijycob@gmail.com-0’ for key ‘unique_module_name_owner_standard’")


#4

Just run

bench update

again


#5

Thank you I did but the same error persists


#6

Can you access the system through the front-end?
If so, maybe manually edit that entry under the “Patient Encounter” section


#7

hi
thank you but am unable to edit this since I cant see the list of the patients encounter


#8

You might need to delete the record in mysql - but it has a massive risk of data corruption. I’m sure someone will have a better option than this if you give it a couple of hours/days