V12 Upgrade Issue: DocType Item Manufacturer not found

I need help getting out of a quagmire.

I am trying to upgrade to v12 and i keep getting this error:

DocType Item Manufacturer not found

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/octo5/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/octo5/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/octo5/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/octo5/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/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/octo5/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/octo5/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/octo5/frappe-bench/apps/frappe/frappe/commands/site.py”, line 233, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/octo5/frappe-bench/apps/frappe/frappe/migrate.py”, line 48, in migrate
frappe.modules.patch_handler.run_all()
File “/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/octo5/frappe-bench/apps/erpnext/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py”, line 44, in execute
item.save()
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py”, line 271, in save
return self.save(*args, **kwargs)
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py”, line 305, in save
self.validate_higher_perm_levels()
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py”, line 572, in validate_higher_perm_levels
high_permlevel_fields = frappe.get_meta(df.options).meta.get_high_permlevel_fields()
File “/home/octo5/frappe-bench/apps/frappe/frappe/init.py”, line 759, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py”, line 37, in get_meta
meta = Meta(doctype)
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py”, line 84, in init
super(Meta, self).init(“DocType”, doctype)
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py”, line 104, in init
self.load_from_db()
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py”, line 89, in load_from_db
super(Meta, self).load_from_db()
File “/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py”, line 147, in load_from_db
frappe.throw((“{0} {1} not found”).format((self.doctype), self.name), frappe.DoesNotExistError)
File “/home/octo5/frappe-bench/apps/frappe/frappe/init.py”, line 360, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/octo5/frappe-bench/apps/frappe/frappe/init.py”, line 346, in msgprint
_raise_exception()
File “/home/octo5/frappe-bench/apps/frappe/frappe/init.py”, line 315, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found

I found a patch which i have run successfully:

bench run-patch erpnext.patches.v12_0.make_item_manufacturer

But the error keeps showing up. Now my instance is stuck as i can’t complete the upgrade and i cannot go back to v11 as there’s no way (least not yet) to install v11 following the release of v12. I would really appreciate any help i can get at this time as this instance is critical.

1 Like

I don’t know if this is going to be your solution, but you should try this:

  • Go to the server terminal and write this:
bench --site SITE_NAME console
  • Once you are in the python console write this:
frappe.reload_doc("stock", "doctype", "item_manufacturer")
frappe.db.commit()
  • Then type:
exit
  • And try again

The issue has been discussed in this thread as well: https://discuss.frappe.io/t/mega-thread-version-12-release-bugs/50987/56

Did you also run: bench update --patch ?

What do you see if you go to frappe-bench/apps/erpnext and do a git status? Does it show as version-12 or whatever was before master? master-hotfix, etc.

If it is master-hotfix, try this command from erpnext folder:

git config remote.upstream.fetch “+refs/heads/(star):refs/remotes/upstream/(star)”.

Now in this command, the technology behind this forum messes up the characters a bit, so if you didn’t realize that and correct it, that could be the problem:

Just run

git config --replace-all remote.upstream.fetch (quotes)+refs/heads/(star):refs/remotes/upstream/(star)(quotes). Where (quotes) is ". or if that gets messed up the Shift+’ which should look like ‘’.

Now:

bench switch-to-branch version-12 --upgrade
bench update --patch

And when the DocType Item Manufacturer not found shows up:

bench run-patch erpnext.patches.v12_0.make_item_manufacturer

if you have multiple sites you will have to do that for each. The default site will go through when you run it the first time, but for the others you will have to use the command

bench --site sitename run-patch erpnext.patches.v12_0.make_item_manufacturer

Hope that helps

Thanks

Jay

3 Likes

Yea, I did

@JayRam

You’re a life saver!!! Thanks a bunch. The missing piece was indicating the site to run the patch as shown below.

I have multiple sites installed and as you rightly identified, I needed to specify the sites to run the patch in order for it to be successful. I think the post in the other thread should be updated as well to indicate for those who may have been in my situation.

@JayRam Could you please shed some light.

My situation is I’m getting the error (moving from v10 → v12)

ModuleNotFoundError: No module named 'frappe.core.doctype.auto_repeat'

I tried
bench run-patch erpnext.patches.v12_0.make_auto_repeat

But it’s like I made it angry.

ModuleNotFoundError: No module named 'erpnext.patches.v12_0.make_auto_repeat'

Btw I could not run your ‘git’ commands. First command I get a > prompt and second one tells me I’m not in a git folder :frowning:

Full error below

erpnext@localhost:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating erpn.airbag888.com
Executing frappe.patches.v12_0.remove_deprecated_fields_from_doctype #3 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.763s
Executing frappe.patches.v11_0.drop_column_apply_user_permissions in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.827s
Executing execute:frappe.reload_doc('core', 'doctype', 'docfield', force=True) #2018-02-20 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.386s
Executing execute:frappe.reload_doc('core', 'doctype', 'docperm') #2018-05-29 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.048s
Executing execute:frappe.reload_doc('core', 'doctype', 'comment') in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.347s
Executing execute:frappe.reload_doc('email', 'doctype', 'document_follow') in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.16s
Executing execute:frappe.reload_doc('core', 'doctype', 'communication_link') in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.269s
Executing execute:frappe.reload_doc('core', 'doctype', 'communication') in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.639s
Executing frappe.patches.v11_0.replicate_old_user_permissions in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 7.597s
Executing frappe.patches.v11_0.reload_and_rename_view_log #2019-01-03 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.179s
Executing frappe.patches.v11_0.copy_fetch_data_from_options in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.468s
Executing frappe.patches.v11_0.change_email_signature_fieldtype in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.644s
Executing frappe.patches.v10_0.refactor_social_login_keys in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.017s
Executing frappe.patches.v10_0.enable_chat_by_default_within_system_settings in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.988s
Executing frappe.patches.v10_0.remove_custom_field_for_disabled_domain in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.231s
Executing execute:frappe.delete_doc("Page", "chat") in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.194s
Executing frappe.patches.v10_0.migrate_passwords_passlib in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.175s
Executing frappe.patches.v11_0.rename_standard_reply_to_email_template in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.607s
Executing execute:frappe.delete_doc_if_exists('Page', 'user-permissions') in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.031s
Executing frappe.patches.v11_0.create_contact_for_user in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.99s
Executing frappe.patches.v11_0.sync_stripe_settings_before_migrate in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.025s
Executing frappe.patches.v11_0.update_list_user_settings in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.059s
Executing frappe.patches.v11_0.rename_workflow_action_to_workflow_action_master #13-06-2018 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.624s
Executing frappe.patches.v11_0.rename_email_alert_to_notification #13-06-2018 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.4s
Executing frappe.patches.v11_0.delete_duplicate_user_permissions in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.051s
Executing frappe.patches.v11_0.set_dropbox_file_backup in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.411s
Executing frappe.patches.v10_0.set_default_locking_time in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.031s
Executing frappe.patches.v11_0.rename_google_maps_doctype in erpn.airbag888.com (_1a06d99ffbb449c1)
/home/erpnext/frappe-bench/apps/frappe/frappe/integrations/doctype/google_maps_settings/google_maps_settings.json missing
Success: Done in 0.357s
Executing frappe.patches.v10_0.modify_smallest_currency_fraction in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.033s
Executing frappe.patches.v10_0.modify_naming_series_table in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.122s
Executing frappe.patches.v10_0.enhance_security in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.576s
Executing frappe.patches.v11_0.multiple_references_in_events in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.479s
Executing frappe.patches.v11_0.set_allow_self_approval_in_workflow in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.391s
Executing frappe.patches.v11_0.remove_skip_for_doctype in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.602s
Executing frappe.patches.v11_0.migrate_report_settings_for_new_listview in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.065s
Executing frappe.patches.v11_0.delete_all_prepared_reports in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.041s
Executing frappe.patches.v11_0.fix_order_by_in_reports_json in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.038s
Executing execute:frappe.delete_doc('Page', 'applications', ignore_missing=True) in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.095s
Executing frappe.patches.v11_0.set_missing_creation_and_modified_value_for_user_permissions in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.034s
Executing frappe.patches.v11_0.set_default_letter_head_source in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.331s
Executing frappe.patches.v12_0.set_primary_key_in_series in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.129s
Executing execute:frappe.delete_doc("Page", "modules", ignore_missing=True) in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.079s
Executing frappe.patches.v12_0.setup_comments_from_communications in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.054s
Executing frappe.patches.v12_0.init_desk_settings #16-05-2019 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.028s
Executing frappe.patches.v12_0.replace_null_values_in_tables in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.265s
Executing frappe.patches.v12_0.reset_home_settings in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.026s
Executing frappe.patches.v12_0.update_print_format_type in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.047s
Executing frappe.patches.v11_0.remove_doctype_user_permissions_for_page_and_report #2019-05-01 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.125s
Executing frappe.patches.v11_0.apply_customization_to_custom_doctype in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.021s
Executing frappe.patches.v12_0.remove_feedback_rating in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.123s
Executing frappe.patches.v12_0.move_form_attachments_to_attachments_folder in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.02s
Executing frappe.patches.v12_0.move_timeline_links_to_dynamic_links in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.063s
Executing frappe.patches.v12_0.delete_feedback_request_if_exists #1 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.043s
Executing frappe.patches.v12_0.rename_events_repeat_on in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.03s
Executing frappe.patches.v12_0.fix_public_private_files in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.024s
Executing erpnext.patches.v11_0.rename_production_order_to_work_order in erpn.airbag888.com (_1a06d99ffbb449c1)
rename_field: work_order not found in Timesheet
Success: Done in 3.559s
Executing erpnext.patches.v11_0.refactor_naming_series in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.539s
Executing erpnext.patches.v11_0.refactor_autoname_naming in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.342s
Executing erpnext.patches.v5_7.update_item_description_based_on_item_master in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.024s
Executing erpnext.patches.v8_1.removed_roles_from_gst_report_non_indian_account #16-08-2018 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.027s
Executing erpnext.patches.v8_7.sync_india_custom_fields in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.06s
Executing erpnext.patches.v10_0.fichier_des_ecritures_comptables_for_france in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.036s
Executing erpnext.patches.v10_0.rename_price_to_rate_in_pricing_rule in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.653s
Executing erpnext.patches.v10_0.set_currency_in_pricing_rule in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.085s
Executing erpnext.patches.v10_0.update_translatable_fields in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.037s
Executing erpnext.patches.v10_0.rename_offer_letter_to_job_offer in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.406s
Executing execute:frappe.delete_doc('DocType', 'Production Planning Tool', ignore_missing=True) in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.158s
Executing erpnext.patches.v10_0.migrate_daily_work_summary_settings_to_daily_work_summary_group # 24-12-2018 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.465s
Executing erpnext.patches.v10_0.add_default_cash_flow_mappers in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.548s
Executing erpnext.patches.v11_0.make_quality_inspection_template in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.061s
Executing erpnext.patches.v10_0.repost_requested_qty_for_non_stock_uom_items in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.062s
Executing erpnext.patches.v11_0.merge_land_unit_with_location in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.59s
Executing erpnext.patches.v11_0.add_index_on_nestedset_doctypes in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 3.639s
Executing erpnext.patches.v11_0.remove_modules_setup_page in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.102s
Executing erpnext.patches.v11_0.rename_employee_loan_to_loan in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 2.327s
Executing erpnext.patches.v11_0.move_leave_approvers_from_employee #13-06-2018 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.554s
Executing erpnext.patches.v11_0.update_department_lft_rgt in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.077s
Executing erpnext.patches.v11_0.add_default_email_template_for_leave in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.1s
Executing execute:frappe.reload_doc("HR", "doctype", "HR Settings") in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.237s
Executing erpnext.patches.v11_0.set_default_email_template_in_hr #08-06-2018 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.186s
Executing erpnext.patches.v11_0.uom_conversion_data #30-06-2018 in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 3.623s
Executing erpnext.patches.v11_0.update_account_type_in_party_type in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 0.262s
Executing erpnext.patches.v11_0.rename_healthcare_doctype_and_fields in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 3.502s
Executing erpnext.patches.v11_0.rename_supplier_type_to_supplier_group in erpn.airbag888.com (_1a06d99ffbb449c1)
Success: Done in 1.744s
Executing erpnext.patches.v10_1.transfer_subscription_to_auto_repeat in erpn.airbag888.com (_1a06d99ffbb449c1)
/home/erpnext/frappe-bench/apps/frappe/frappe/desk/doctype/auto_repeat/auto_repeat.json missing
Traceback (most recent call last):
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/utils.py", line 204, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(module_name)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 808, in get_module
    return importlib.import_module(modulename)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'frappe.core.doctype.auto_repeat'

During handling of the above exception, another exception occurred:

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/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/erpnext/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/erpnext/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/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/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/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py", line 234, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
    frappe.modules.patch_handler.run_all(skip_failing)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 41, in run_all
    run_patch(patch)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 30, in run_patch
    if not run_single(patchmodule = patch):
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 71, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 91, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py", line 27, in execute
    auto_repeat = frappe.get_doc(doc)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 734, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 67, in get_doc
    controller = get_controller(doctype)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py", line 42, in get_controller
    module = load_doctype_module(doctype, module_name)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/utils.py", line 206, in load_doctype_module
    raise ImportError('Module import failed for {0} ({1})'.format(doctype, module_name + ' Error: ' + str(e)))
ImportError: Module import failed for Auto Repeat (frappe.core.doctype.auto_repeat.auto_repeat Error: No module named 'frappe.core.doctype.auto_repeat')
erpnext@localhost:~/frappe-bench$ bench run-patch erpnext.patches.v12_0.make_auto_repeat
Executing erpnext.patches.v12_0.make_auto_repeat in erpn.airbag888.com (_1a06d99ffbb449c1)
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/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/erpnext/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/erpnext/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/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/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/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py", line 251, in run_patch
    frappe.modules.patch_handler.run_single(module, force=context.force)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 71, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 91, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 1027, in get_attr
    return getattr(get_module(modulename), methodname)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 808, in get_module
    return importlib.import_module(modulename)
  File "/home/erpnext/frappe-bench/env/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'erpnext.patches.v12_0.make_auto_repeat'

Can we step back a moment and can you tell me what you’re trying to accomplish and what have you done so far in that direction?

If you’re trying to install ver12 first and then move from ver12 to ver11, I tried it and it’s not straight forward and I didn’t succeed. That doesn’t mean that you or somebody else can’t make it work, but it will take some work.

Thanks

Jay