Error Migrating from ERPNext 3 to 4


I am migrating ERPNext from 3 to 4 and getting the below error. Can anyone help?

Executing erpnext.patches.v4_2.default_website_style in erpnext (erpnext)
Traceback (most recent call last):
File “/home/erpnext/bench-repo/bench/”, line 106, in
File “/home/erpnext/bench-repo/bench/”, line 38, in main
File “/home/erpnext/bench-repo/bench/”, line 86, in migrate
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 67, in new_fn
return fn(*args, **new_kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 422, in latest
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/”, line 50, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/”, line 66, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v4_2/”, line 6, in execute
if not style_settings.apply_style:
AttributeError: ‘StyleSettings’ object has no attribute ‘apply_style’
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/”, line 29, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/”, line 162, in migrate_3to4
File “/home/erpnext/bench-repo/bench/”, line 59, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/”, line 540, in check_call
raise CalledProcessError(retcode, cmd)


Pushed a fix, please run bench update

It worked. Thanx.

However i encountered one more bug which i managed myself but just wanted to update you so that you can debug and remove it.
The Migration script tried to drop a table ‘tabWebsite Route’ which in my case wasn’t there and was getting failed at that point. So i manually created it so that it passes that step.