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 (https://github.com/frappe/erpnext/pull/8781). 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.
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…
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