Upgradation stuck with an error frappe.exceptions.ValidationError: Options must be a valid DocType for field Print Style in row 17

/home/frappe/frappe-bench# bench update --upgrade
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
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → 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
    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
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} ( current: {“os”:“linux”,“arch”:“x64”})
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    Migrating site1.local
    Executing frappe.patches.v8_0.set_currency_field_precision # 2017-05-09 in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_0.rename_print_to_printing in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_0.update_desktop_icons in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_0.update_gender_and_salutation in site1.local (1bd3e0294da19198)
    Success
    Executing execute:frappe.db.sql(‘update tabReport set module=“Desk” where name=“ToDo”’) in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_1.enable_allow_error_traceback_in_system_settings in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_1.update_format_options_in_auto_email_report in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_1.delete_custom_docperm_if_doctype_not_exists in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_5.delete_email_group_member_with_invalid_emails in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_x.update_user_permission in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_5.patch_event_colors in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_7.update_email_queue_status in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_10.delete_static_web_page_from_global_search in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.move_perpetual_inventory_setting in site1.local (1bd3e0294da19198)
    Success
    Executing execute:frappe.reload_doc(‘stock’, ‘doctype’, ‘warehouse’) # 2017-04-24 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.stock_uom_in_selling in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.create_domain_docs #16-05-2017 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_assessment_modules in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_doctype_status in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_salary_slips in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.delete_fleet_management_module_def in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.contact_address_links in site1.local (1bd3e0294da19198)
    Updating Contact : [========================================]
    Updating Address : [========================================]
    Success
    Executing erpnext.patches.v7_2.mark_students_active in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.set_null_value_to_fields in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_guardian_name_in_student_master in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_abbr_in_salary_slips in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.rename_evaluation_criteria in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_party_type in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.setup_auto_close_settings in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.rename_att_date_attendance in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.update_attendance_docstatus in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.move_dates_from_salary_structure_to_employee in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v7_2.make_all_assessment_group in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.repost_reserved_qty_for_multiple_sales_uom in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.addresses_linked_to_lead in site1.local (1bd3e0294da19198)
    Success
    Executing execute:frappe.delete_doc(‘DocType’, ‘Purchase Common’) in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_stock_qty_value_in_purchase_invoice in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_supplier_address_in_stock_entry in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.rename_is_sample_item_to_allow_zero_valuation_rate in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.set_null_to_serial_nos_for_disabled_sales_invoices in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.enable_booking_asset_depreciation_automatically in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.set_project_copied_from in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_status_as_paid_for_completed_expense_claim in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.revert_manufacturers_table_from_item in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.disable_instructor_role in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.merge_student_batch_and_student_group in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.rename_total_margin_to_rate_with_margin # 11-05-2017 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.fix_status_for_invoices_with_negative_outstanding in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.make_payments_table_blank_for_non_pos_invoice in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.set_sales_invoice_serial_number_from_delivery_note in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.delete_schools_depricated_doctypes in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_customer_pos_id in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.rename_items_in_status_field_of_material_request in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.delete_bin_indexes in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.move_account_head_from_account_to_warehouse_for_inventory in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.change_in_words_varchar_length in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_stock_qty_value_in_bom_item in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_sales_cost_in_project in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.save_system_settings in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.delete_deprecated_reports in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.setup_gst_india #2017-06-27 in site1.local (1bd3e0294da19198)
    WARNING Property: Unknown Property name. [11:3: overflow-wrap]
    Success
    Executing execute:frappe.reload_doc(‘regional’, ‘doctype’, ‘gst_hsn_code’) in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.removed_roles_from_gst_report_non_indian_account in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.gst_fixes #2017-07-06 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_0.update_production_orders in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.remove_sales_invoice_from_returned_serial_no in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.allow_invoice_copy_to_edit_after_submit in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.add_hsn_sac_codes in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.update_gst_state #17-07-2017 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.removed_report_support_hours in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.add_indexes_in_transaction_doctypes in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_3.set_restrict_to_domain_for_module_def in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.update_expense_claim_status in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_3.update_company_total_sales #2017-08-16 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_4.make_scorecard_records in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_1.set_delivery_date_in_so_item #2017-07-28 in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_5.fix_tax_breakup_for_non_invoice_docs in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_5.remove_quotations_route_in_sidebar in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_5.update_existing_data_in_project_type in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_5.set_default_mode_of_payment in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_5.update_customer_group_in_POS_profile in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_6.update_timesheet_company_from_PO in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_6.set_write_permission_for_quotation_for_sales_manager in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_5.remove_project_type_property_setter in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_7.add_more_gst_fields in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_7.fix_purchase_receipt_status in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_6.rename_bom_update_tool in site1.local (1bd3e0294da19198)
    Success
    Executing erpnext.patches.v8_9.set_print_zero_amount_taxes 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 94, 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 24, in func
    ret = f(frappe.dict(ctx.obj), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 217, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, 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/v8_9/set_print_zero_amount_taxes.py”, line 7, in execute
    create_print_zero_amount_taxes_custom_field()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/install.py”, line 63, in create_print_zero_amount_taxes_custom
    field
    ‘insert_after’: ‘allow_print_for_cancelled’
    File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 106, in create_custo m_field
    “hidden”: df.hidden or 0
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 219, in insert
    self.run_post_save_methods()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 790, in run_post_save_methods
    self.run_method(“on_update”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 51, in on_update
    validate_fields_for_doctype(self.dt)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 384, in validate_fields_for_doct ype
    validate_fields(frappe.get_meta(doctype, cached=False))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 616, in validate_fields
    check_link_table_options(d)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 430, in check_link_table_options
    frappe.throw(
    (“Options must be a valid DocType for field {0} in row {1}”).format(d.label, d.idx))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 319, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
    _raise_exception()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
    raise raise_exception(encode(msg))
    frappe.exceptions.ValidationError: Options must be a valid DocType for field Print Style in row 17

Please add a GitHub issue for this.

Same error, have you added github issue already?

Yes added the same on github

I am experiencing this same issue. Please advise.

Pushed a fix

Sadly, no positive results.

bench update --upgrade
....
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 430, in check_link_table_options
    frappe.throw(_("Options must be a valid DocType for field {0} in row {1}").format(d.label, d.idx))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 319, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 282, in _raise_exception
    raise raise_exception(encode(msg))
frappe.exceptions.ValidationError: Options must be a valid DocType for field Print Style in row 17

For others who bumped into this like me. This is the fix’s commit reload print style · frappe/erpnext@4ebac33 · GitHub

If you’re wise you’ll wait for it to be pushed to a new release.

If you’re savvy then you’ll cherry pick the change into your erpnext git repo manually.

If you like living dangerously and have a backup then you could bench switch-to-develop --upgrade and rerun the bench update --patch command. But really don’t do that unless you have a backup.

Pushed a fix in the latest version, please update again.

End up with another error

/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
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → 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
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    Migrating site1.local
    Executing erpnext.patches.v8_1.setup_gst_india #2017-06-27 in site1.local (1bd3e0294da19198)
    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 94, 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 24, in _func
    ret = f(frappe.dict(ctx.obj), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 217, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, 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/v8_1/setup_gst_india.py”, line 22, in execute
    setup(patch=True)
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py”, line 12, in setup
    make_custom_fields()
    File “/home/frappe/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py”, line 151, in make_custom_fields
    create_custom_fields(custom_fields)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 117, in create_custom_fields
    create_custom_field(doctype, df)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 106, in create_custom_field
    “hidden”: df.hidden or 0
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 219, in insert
    self.run_post_save_methods()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 795, in run_post_save_methods
    self.run_method(“on_update”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 671, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 892, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 875, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 665, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 51, in on_update
    validate_fields_for_doctype(self.dt)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 384, in validate_fields_for_doctype
    validate_fields(frappe.get_meta(doctype, cached=False))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 616, in validate_fields
    check_link_table_options(d)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 430, in check_link_table_options
    frappe.throw(
    (“Options must be a valid DocType for field {0} in row {1}”).format(d.label, d.idx))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 319, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
    _raise_exception()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
    raise raise_exception(encode(msg))
    frappe.exceptions.ValidationError: Options must be a valid DocType for field Subscription in row 109

Fixed in the latest release

Thanks Nabin …its worked fine

Thanks! It worked! Version 9.0.3 (Y)