Just migrating a database from latest V11 to latest V12
I do have about 3K items on the TabItem_Tax
After about 30min I get always this error message:
Executing erpnext.patches.v12_0.move_item_tax_to_item_tax_template in mvs (_92dd934f94047209)
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 "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/opt/bench/erpnext/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/commands/__init__.py", line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/commands/site.py", line 233, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File "/opt/bench/erpnext/apps/frappe/frappe/migrate.py", line 48, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 41, in run_all
run_patch(patch)
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 30, in run_patch
if not run_single(patchmodule = patch):
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 91, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/opt/bench/erpnext/apps/erpnext/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py", line 44, in execute
item.save()
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 271, in save
return self._save(*args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 324, in _save
self.run_post_save_methods()
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 917, in run_post_save_methods
self.run_method("on_update")
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 786, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 1056, in composer
return composed(self, method, *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 1039, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 780, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/opt/bench/erpnext/apps/erpnext/erpnext/stock/doctype/item/item.py", line 138, in on_update
self.update_variants()
File "/opt/bench/erpnext/apps/erpnext/erpnext/stock/doctype/item/item.py", line 760, in update_variants
variants=variants, template=self, now=frappe.flags.in_test, timeout=600)
File "/opt/bench/erpnext/apps/frappe/frappe/__init__.py", line 1466, in enqueue
return frappe.utils.background_jobs.enqueue(*args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/utils/background_jobs.py", line 42, in enqueue
return frappe.call(method, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/__init__.py", line 1036, in call
return fn(*args, **newargs)
File "/opt/bench/erpnext/apps/erpnext/erpnext/stock/doctype/item/item.py", line 1111, in update_variants
copy_attributes_to_variant(template, variant)
File "/opt/bench/erpnext/apps/erpnext/erpnext/controllers/item_variant.py", line 274, in copy_attributes_to_variant
row = copy.deepcopy(d)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/opt/bench/erpnext/env/lib/python3.6/copy.py", line 238, in _deepcopy_dict
memo[id(x)] = y
MemoryError