Help to solve updating status 503

Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Updating customizations for Address
Migrating site1.local
Executing erpnext.patches.v12_0.add_state_code_for_ladakh in site1.local (_1bd3e0294da19198)
Traceback (most recent call last):
File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/dvk/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 99, in
main()
File “/home/dvk/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/dvk/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/dvk/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/dvk/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/dvk/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/dvk/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/dvk/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/dvk/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/dvk/frappe-bench/apps/frappe/frappe/commands/init.py”, line 26, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/dvk/frappe-bench/apps/frappe/frappe/commands/site.py”, line 286, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File “/home/dvk/frappe-bench/apps/frappe/frappe/migrate.py”, line 48, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File “/home/dvk/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 41, in run_all
run_patch(patch)
File “/home/dvk/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 30, in run_patch
if not run_single(patchmodule = patch):
File “/home/dvk/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/dvk/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 91, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/dvk/frappe-bench/apps/erpnext/erpnext/patches/v12_0/add_state_code_for_ladakh.py”, line 14, in execute
gst_state_field = frappe.get_doc(‘Custom Field’, field)
File “/home/dvk/frappe-bench/apps/frappe/frappe/init.py”, line 762, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/dvk/frappe-bench/apps/frappe/frappe/model/document.py”, line 71, in get_doc
return controller(*args, **kwargs)
File “/home/dvk/frappe-bench/apps/frappe/frappe/model/document.py”, line 106, in init
self.load_from_db()
File “/home/dvk/frappe-bench/apps/frappe/frappe/model/document.py”, line 149, in load_from_db
frappe.throw(
("{0} {1} not found").format(
(self.doctype), self.name), frappe.DoesNotExistError)
File “/home/dvk/frappe-bench/apps/frappe/frappe/init.py”, line 377, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable)
File “/home/dvk/frappe-bench/apps/frappe/frappe/init.py”, line 356, in msgprint
_raise_exception()
File “/home/dvk/frappe-bench/apps/frappe/frappe/init.py”, line 316, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: Custom Field Tax Category-gst_state not found
INFO: A newer version of bench is available: 5.2.1 → 5.3.0

I am testing on ERPNext using VM image, post install I did Bench Update and at the end I too get this error

Blockquoteimage

And login page is stuck in Updating

1 Like

Any update

bench --site your_site set-config maintenance_mode 0

This will disable maintenance mode and you should be able to access your site again.

2 Likes

after executing

bench --site site1.local set-config maintenance_mode 0

I get following message

Please specify --site sitename

set-config file is already changed to mainenance_mode 0, but still it does not work

Try bench clear-cache

@dj12djdjs still stuck

Executing erpnext.patches.v12_0.add_state_code_for_ladakh in home.xyz.com (home_erp)
Traceback (most recent call last):
File “/usr/local/lib/python3.7/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/local/lib/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/home-bench/apps/frappe/frappe/utils/bench_helper.py”, line 101, in
main()
File “/home/frappe/home-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/home-bench/env/lib/python3.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/home-bench/env/lib/python3.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/home-bench/env/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/home-bench/env/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/home-bench/env/lib/python3.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/home-bench/env/lib/python3.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/home-bench/env/lib/python3.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/home-bench/apps/frappe/frappe/commands/init.py”, line 27, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/frappe/home-bench/apps/frappe/frappe/commands/site.py”, line 300, in migrate
skip_search_index=skip_search_index
File “/home/frappe/home-bench/apps/frappe/frappe/migrate.py”, line 67, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File “/home/frappe/home-bench/apps/frappe/frappe/modules/patch_handler.py”, line 41, in run_all
run_patch(patch)
File “/home/frappe/home-bench/apps/frappe/frappe/modules/patch_handler.py”, line 30, in run_patch
if not run_single(patchmodule = patch):
File “/home/frappe/home-bench/apps/frappe/frappe/modules/patch_handler.py”, line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/home-bench/apps/frappe/frappe/modules/patch_handler.py”, line 91, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/frappe/home-bench/apps/erpnext/erpnext/patches/v12_0/add_state_code_for_ladakh.py”, line 14, in execute
gst_state_field = frappe.get_doc(‘Custom Field’, field)
File “/home/frappe/home-bench/apps/frappe/frappe/init.py”, line 821, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/home-bench/apps/frappe/frappe/model/document.py”, line 74, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/home-bench/apps/frappe/frappe/model/document.py”, line 112, in init
self.load_from_db()
File “/home/frappe/home-bench/apps/frappe/frappe/model/document.py”, line 155, in load_from_db
frappe.throw(
("{0} {1} not found").format(
(self.doctype), self.name), frappe.DoesNotExistError)
File “/home/frappe/home-bench/apps/frappe/frappe/init.py”, line 424, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/frappe/home-bench/apps/frappe/frappe/init.py”, line 403, in msgprint
_raise_exception()
File “/home/frappe/home-bench/apps/frappe/frappe/init.py”, line 357, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: Custom Field Tax Category-gst_state not found

Any can help

Hi @nayanivijay & @venkat_kumar ,

There is a work around. You can insert Tax Category-gst_state field in Table Custom Field manually in your database by running below INSERT query.

INSERT INTO <*YOUR DATABASE NAME*>.`tabCustom Field`
(name, creation, modified, modified_by, owner, docstatus, parent, parentfield, parenttype, idx, dt, label, fieldname, insert_after, `length`, fieldtype, `precision`, `options`, fetch_from, fetch_if_empty, collapsible, collapsible_depends_on, `default`, depends_on, description, permlevel, width, `columns`, reqd, `unique`, `read_only`, ignore_user_permissions, hidden, print_hide, print_hide_if_no_value, print_width, no_copy, allow_on_submit, in_list_view, in_standard_filter, in_global_search, bold, report_hide, search_index, allow_in_quick_entry, ignore_xss_filter, translatable, `_user_tags`, `_comments`, `_assign`, `_liked_by`)
VALUES('Tax Category-gst_state', '2019-11-11 16:16', '2019-11-11 16:16', 'Administrator', 'Administrator', 0, NULL, NULL, NULL, 0, 'Tax Category', 'Source State', 'gst_state', 'company', 0, 'Select', NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, NULL, NULL, NULL);

Then again perform bench update.

I hope this will work.