Error Migrating from ERPNext 3 to 4

Hi,

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/migrate3to4.py”, line 106, in
main(args.site)
File “/home/erpnext/bench-repo/bench/migrate3to4.py”, line 38, in main
migrate(site)
File “/home/erpnext/bench-repo/bench/migrate3to4.py”, line 86, in migrate
latest()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py”, line 67, in new_fn
return fn(*args, **new_kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py”, line 422, in latest
frappe.modules.patch_handler.run_all()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 50, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 66, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v4_2/default_website_style.py”, 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/cli.py”, line 29, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 162, in migrate_3to4
site=path))
File “/home/erpnext/bench-repo/bench/utils.py”, line 59, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)

Thanks

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.

Thanks.