Error upgrading to v8

Hi, please help,

Trying to upgrade from ERPNext: v7.2.27 / Frappe Framework: v7.2.27

Getting error when running bench update --upgrade

Error message:
Executing frappe.patches.v8_0.set_currency_field_precision # 2017-05-09 in site1.local (1bd3e0294d)
Traceback (most recent call last):
File “/usr/lib64/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib64/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, li ne 79, in
main()
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, li ne 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File "/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py ", line 664, in call
return self.main(*args, **kwargs)
File "/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py ", line 644, in main
rv = self.invoke(ctx)
File "/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py ", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py ", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py ", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py “, line 464, in invoke
return callback(*args, **kwargs)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/commands/init.py”, lin e 24, in _func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/commands/site.py”, line 21 4, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in m igrate
frappe.modules.patch_handler.run_all()
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File "/home/cahyadi/frappe-bench/apps/frappe/frappe/patches/v8_0/set_currency
field_precision.py”, line 22, in execute
ss.save()
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 2 30, in save
return self._save(*args, **kwargs)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 2 63, in _save
self.run_before_save_methods()
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 7 71, in run_before_save_methods
self.run_method(“validate”)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 6 66, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 8 91, in composer
return composed(self, method, *args, **kwargs)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 8 74, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/model/document.py”, line 6 60, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/cahyadi/frappe-bench/apps/frappe/frappe/core/doctype/system_settin gs/system_settings.py”, line 16, in validate
minimum_password_score = cint(self.minimum_password_score) or 0
AttributeError: ‘SystemSettings’ object has no attribute 'minimum_password_score ’

I have pushed a fix to develop branch.

But if you want to continue now, try running bench --force --site <your-site-name> reload-doc core doctype system_settings and then update again.

1 Like

Ok, trying…

Hi, Still facing the same error. I restore the whole database and redo update.

Hi, this is what I did:

  1. Restore database
  2. Do bench update --upgrade
  3. Faced error: AttributeError: ‘SystemSettings’ object has no attribute ‘minimum_password_score’
  4. Run bench --force --site site1.local reload-doc core doctype system_settings
  5. Retry upgrade using: bench retry-upgrade
  6. Faced another error:
    Executing erpnext.patches.v7_2.mark_students_active in site1.local (1bd3e0294d)
    /home/cahyadi/frappe-bench/apps/erpnext/erpnext/schools/doctype/student_batch_student/student_batch_student.json missing
    Traceback (most recent call last):
    File “/usr/lib64/python2.7/runpy.py”, line 162, in _run_module_as_main
    main”, fname, loader, pkg_name)
    File “/usr/lib64/python2.7/runpy.py”, line 72, in _run_code
    exec code in run_globals
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 664, in call
    return self.main(*args, **kwargs)
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 644, in main
    rv = self.invoke(ctx)
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
    return callback(*args, **kwargs)
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/commands/site.py”, line 214, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
    if not run_single(patchmodule = patch):
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/cahyadi/frappe-bench/apps/erpnext/erpnext/patches/v7_2/mark_students_active.py”, line 6, in execute
    frappe.db.sql(“update tabStudent Batch Student set active=1”)
    File “/home/cahyadi/frappe-bench/apps/frappe/frappe/database.py”, line 149, in sql
    self._cursor.execute(query)
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/home/cahyadi/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
    raise errorclass, errorvalue
    _mysql_exceptions.OperationalError: (1054, “Unknown column ‘active’ in ‘field list’”)

@Cahyadi_Suwindra,

This issue is fixed on develop branch, Please wait until fix is released into master

@makarand_b
Any news on this fix and the others ? as i have a DB stopped due to those errors.

I restored some day ago in VM.
I had supervisor error as you.

May this helps:

hi @nabinhait i used bench --force --site reload-doc core doctype system_settings and it works but i get blank login page see attachments.

regards

solosoft I recognize that same traceback -

If you now clear all the various caches, you may get your expected login display.

bench clear-cache
bench clear-website-cache

Also clear the browser’s cache and cookies, and restart the server…
sudo supervisorctl stop all
sudo supervisorctl start all

To test using two browsers, say Firefox and Chrome, helps diagnose whether the error source relates to the browser’s interpreter - traceback’s differ - or the code that the interpreter is running.- traceback’s match

2 Likes

hi @clarkej thank you issue done.

regards

Please close this subject.