Error in updating ERPNext to 7.1

Traceback (most recent call last):
File “/usr/lib/python2.7/”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/”, lin e 79, in
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/”, lin e 16, in main
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co”, line 664, in call
return self.main(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co”, line 644, in main
rv = self.invoke(ctx)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/”, line 24, in _func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/”, line 209 , in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 30, in mi grate
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/patches/v7_1/sync_language", line 5, in execute
frappe.reload_doc(‘core’, ‘doctype’, ‘language’)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 645, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, line 141 , in reload_doc
return import_files(module, dt, dn, force=force)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, li ne 17, in import_files
return import_file(module, dt, dn, force=force, pre_process=pre_process)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, li ne 22, in import_file
ret = import_file_by_path(path, force, pre_process=pre_process)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, li ne 54, in import_file_by_path
import_doc(doc, force=force, data_import=data_import, pre_process=pre_proces s)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/”, li ne 122, in import_doc
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 22 2, in insert
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 77 1, in run_post_save_methods
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 65 4, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 88 2, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 86 5, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 64 8, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctyp”, line 142, in on_update
updatedb(, self)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 6 9, in updatedb
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 1 46, in sync
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/”, line 1 81, in create
engine=self.meta.engine or ‘InnoDB’) % (, add_text))
AttributeError: ‘DocType’ object has no attribute ‘engine’

Anyway just to add on, i’ve seen many other posts saying that the error works after rebooting or by running bench update again. Yes, I’ve tried those and it does work but we host nearly 100 sites!! I can’t be running bench update for a 100 times right? :smiley:


I have got the same error and below commands worked for me

bench migrate
bench update --patch
bench update


I have to admin being culpable of not knowing exactly whether my error was the same as the one this topic started with. Also I had to run the final bench update twice though

o, yes and all that work only from inside /home/frappe/frappe-bench (or wherever the frappe-bench folder might be on your system)

Try updating Ubuntu and then rebooting before trying to update frappe.
@Justin_Lu…100 instances of ERPNext ??? Noah thats a few :slight_smile: Are you running them in production mode? This way the will auto restart. HTH

Yes the above commands do fix it but the problem is I have to keep running bench update (around 2 times per site) to let the update go through. It shouldn’t be that way at all! There should be a fix to this right? How can the fix be to run the bench update twice and miraculously fix it.

@System19 yes, all are running in production mode but still everytime i run bench update it has problem, and i have to keep restarting the bench update to update each site manually.

@Justin_Lu so how would you normally update your 100 sites?
Sorry can you describe in more detail as to how you have these sites set up… Are they under one domain? etc etc

even though it’s true what you say (that it probably shouldn’t be that way) …

being practical: can’t you just write a script that does it for you?

Some kind of bash script would speed up this process… Thats why I was wondering how @Justin_Lu currently updates that many installs.