Upgrading from v7 to v8 issues

ERPNext: v7.2.32
Frappe Framework: v7.2.31

I have installed a fresh version of ERPNext and Frappe on a newer server
Erpnext 8.0.26
Frappe 8.0.43

Restored the DB from V7 and there are errors on Student tables ([minor] create student batch if does not exists by mbauskar · Pull Request #8781 · frappe/erpnext · GitHub). I have noticed that my new V8 DB (site1.local) as 422 tables while the restored V7 DB (demo.angolaerp) has 380 tables …

Should not the system before or during upgrade check the Number of Tables the DB has and create the missing ones?
As my last error log on pull 8781 i can see that the table Student Group does not exist reason why the patch not running well.

Can you share the full trace?

Hi @Helio_Jesus,
The issue has been fixed and it will be released today.

1 Like

Hi @ManasSolanki
Thanks for your reply. I hope this fixes my problem… Also to inform that before those errors it gave me an error about password limit…

Do you still need the full trace?

Yes please do if you can @Helio_Jesus

Of course a log trace before is the ideal best to identify and troubleshoot.

But after is helpful too - the forum deal is all about learning, sharing and contributing.

cheers

1 Like

This is the table diff from site1 and my demo


When doing Bench update and as i said on my previous issue “added the field Active manually” and now the error is this

helio@ubuntu:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 10 (delta 8), reused 10 (delta 8), pack-reused 0
Unpacking objects: 100% (10/10), done.
From GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
2f03e9f…a39fb1e master → origin/master
Updating 2f03e9f…a39fb1e
Fast-forward
bench/config/templates/nginx.conf | 2 ±
bench/utils.py | 2 ±
2 files changed, 2 insertions(+), 2 deletions(-)
remote: Counting objects: 53, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 53 (delta 44), reused 39 (delta 30), pack-reused 0
Unpacking objects: 100% (53/53), done.
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
5c6483d…d9c5597 develop → upstream/develop

  • [new tag] v8.0.44 → v8.0.44
    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 develop
    From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
  • branch develop → FETCH_HEAD
    Updating 5c6483d…d9c5597
    Fast-forward
    frappe/init.py | 2 ±
    frappe/email/doctype/contact/contact.js | 2 ±
    frappe/email/doctype/email_alert/email_alert.py | 9 +++++++±
    frappe/email/doctype/email_alert/test_email_alert.py | 30 ++++++++++++++++++++++++++++++
    frappe/exceptions.py | 1 +
    frappe/model/naming.py | 10 ++++++±–
    frappe/public/js/frappe/ui/keyboard.js | 41 ++++++++++++++++++++++±-----------------
    frappe/public/js/frappe/views/reports/reportview.js | 9 +++++±–
    frappe/utils/global_search.py | 2 ±
    9 files changed, 78 insertions(+), 28 deletions(-)
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream develop
    remote: Counting objects: 191, done.
    remote: Compressing objects: 100% (52/52), done.
    remote: Total 191 (delta 154), reused 176 (delta 139), pack-reused 0
    Receiving objects: 100% (191/191), 442.54 KiB | 176.00 KiB/s, done.
    Resolving deltas: 100% (154/154), completed with 86 local objects.
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch develop → FETCH_HEAD
    7bf8103…3bd15fb develop → upstream/develop
    Merge made by the ‘recursive’ strategy.
    erpnext/init.py | 2 ±
    erpnext/accounts/doctype/payment_entry/payment_entry.js | 1 +
    erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 5 ±
    erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py | 46 +++++++++++++++
    erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 8 +±
    erpnext/accounts/page/pos/pos.js | 13 +++±
    erpnext/controllers/status_updater.py | 11 +±-
    erpnext/controllers/taxes_and_totals.py | 2 +
    erpnext/docs/assets/img/setup/integrations/payment_gateway_account_stripe.png | Bin 0 → 196035 bytes
    erpnext/docs/assets/img/setup/integrations/stripe_coa.png | Bin 0 → 165075 bytes
    erpnext/docs/assets/img/setup/integrations/stripe_setting.png | Bin 0 → 167559 bytes
    erpnext/docs/user/manual/en/setting-up/integrations/stripe-integration.md | 30 ++++++++++
    erpnext/hr/doctype/vehicle_log/vehicle_log.js | 8 +++
    erpnext/hr/doctype/vehicle_log/vehicle_log.json | 85 +++++++±-------------------
    erpnext/manufacturing/doctype/bom/bom.js | 4 ±
    erpnext/patches.txt | 4 ±
    erpnext/patches/v8_0/fix_status_for_invoices_with_negative_outstanding.py | 23 ++++++++
    erpnext/patches/v8_0/make_payments_table_blank_for_non_pos_invoice.py | 15 +++++
    erpnext/projects/doctype/project/project.py | 14 +++±
    erpnext/public/css/erpnext.css | 5 ++
    erpnext/public/js/controllers/taxes_and_totals.js | 2 +
    erpnext/public/less/erpnext.less | 4 ++
    erpnext/schools/doctype/program/program.json | 11 ++±
    …/doctype/student_group_creation_tool/student_group_creation_tool.js | 25 +++++±–
    …/doctype/student_group_creation_tool/student_group_creation_tool.json | 80 +++++++++++++++++++++++±-
    …/doctype/student_group_creation_tool/student_group_creation_tool.py | 61 ++++++++++++±------
    …/student_group_creation_tool_course.json | 109 ++++++++++++++++++++++++++++++++±–
    …/report/student_batch_wise_attendance/student_batch_wise_attendance.py | 2 ±
    erpnext/selling/doctype/quotation/quotation.json | 88 +++++++++++++++++++++++++++±
    erpnext/selling/doctype/sales_order/test_sales_order.py | 4 ±
    erpnext/selling/page/sales_funnel/sales_funnel.js | 4 ++
    erpnext/setup/doctype/naming_series/naming_series.py | 17 ++++±
    erpnext/setup/doctype/territory/territory.json | 4 ±
    erpnext/stock/doctype/item/item.js | 15 +++±
    erpnext/stock/doctype/item/item.json | 68 ++++++++++±----------
    erpnext/stock/doctype/item/item.py | 13 +++±
    erpnext/stock/doctype/price_list/price_list.js | 11 +±-
    erpnext/utilities/init.py | 3 ±
    erpnext/utilities/transaction_base.py | 4 ++
    39 files changed, 628 insertions(+), 173 deletions(-)
    create mode 100644 erpnext/docs/assets/img/setup/integrations/payment_gateway_account_stripe.png
    create mode 100644 erpnext/docs/assets/img/setup/integrations/stripe_coa.png
    create mode 100644 erpnext/docs/assets/img/setup/integrations/stripe_setting.png
    create mode 100644 erpnext/docs/user/manual/en/setting-up/integrations/stripe-integration.md
    create mode 100644 erpnext/patches/v8_0/fix_status_for_invoices_with_negative_outstanding.py
    create mode 100644 erpnext/patches/v8_0/make_payments_table_blank_for_non_pos_invoice.py
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling angola_erp
    INFO:bench.utils:git pull upstream master
    From GitHub - Helkyd/angola_erp
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling chart_of_accounts_builder
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/chart_of_accounts_builder
  • 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/helio/.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/chart_of_accounts_builder/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/angola_erp/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    Backing up sites…
    Patching sites…
    Migrating demo.angolaerp
    Executing erpnext.patches.v8_0.merge_student_batch_and_student_group in demo.angolaerp (4a8671fcb4e4542a)
    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/helio/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/helio/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
    return self.main(*args, **kwargs)
    File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
    rv = self.invoke(ctx)
    File “/home/helio/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/helio/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/helio/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/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
    return callback(*args, **kwargs)
    File “/home/helio/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/helio/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/helio/frappe-bench/apps/frappe/frappe/commands/site.py”, line 214, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/helio/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/helio/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
    if not run_single(patchmodule = patch):
    File “/home/helio/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/helio/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/helio/frappe-bench/apps/erpnext/erpnext/patches/v8_0/merge_student_batch_and_student_group.py”, line 39, in execute
    doc.save()
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in save
    return self.save(*args, **kwargs)
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 253, in save
    self.insert()
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 189, in insert
    self.validate_higher_perm_levels()
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 458, in validate_higher_perm_levels
    high_permlevel_fields = frappe.get_meta(df.options).meta.get_high_permlevel_fields()
    File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 623, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 31, in get_meta
    return frappe.cache().hget(“meta”, doctype, lambda: Meta(doctype))
    File “/home/helio/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 171, in hget
    value = generator()
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 31, in
    return frappe.cache().hget(“meta”, doctype, lambda: Meta(doctype))
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 66, in init
    super(Meta, self).init(“DocType”, doctype)
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 84, in init
    self.load_from_db()
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 71, in load_from_db
    super(Meta, self).load_from_db()
    File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 115, in load_from_db
    frappe.throw(
    (“{0} {1} not found”).format(
    (self.doctype), self.name), frappe.DoesNotExistError)
    File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 316, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
    File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 306, in msgprint
    _raise_exception()
    File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 279, in _raise_exception
    raise raise_exception, encode(msg)
    frappe.exceptions.DoesNotExistError: DocType Student Group Instructor not found
1 Like

Any news on those updates being fixed ?
As i have DBs not being able to start due to this and i have no other way of having just version 7.2.x working

@ebjorsell had a similar problem to yours and yesterday reported the issue here

https://github.com/frappe/erpnext/issues/8875