Error after latest update on jan-20

we did a bench update today Jan 20th (we do an almost daily update) and got the following error:

Executing execute:frappe.reload_doctype(‘Item’) in erpnext.erpnext-vm (erpnext)
Success
Executing erpnext.patches.v6_16.create_manufacturer_records in erpnext.erpnext-vm (erpnext)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 213, in migrate
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 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v6_16/create_manufacturer_records.py”, line 9, in execute
frappe.reload_doctype(“Manufacturer”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 574, in reload_doctype
reload_doc(scrub(db.get_value(“DocType”, doctype, “module”)), “doctype”, scrub(doctype), force=force)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 599, in scrub
return txt.replace(’ ‘,’
’).replace(’-’, '
’).lower()
AttributeError: ‘NoneType’ object has no attribute ‘replace’
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 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/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-3.3-py2.7.egg/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 247, in update
patch_sites()
File “/home/erpnext/bench-repo/bench/utils.py”, line 118, in patch_sites
run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench=bench)
File “/home/erpnext/bench-repo/bench/utils.py”, line 427, in run_frappe_cmd
subprocess.check_call((f, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’) + args, cwd=sites_dir)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘(’/home/erpnext/frappe-bench/env/bin/python’, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’, ‘–site’, ‘all’, ‘migrate’)’ returned non-zero exit status 1

any ideas?
Thanks

1 Like

Seems like an issue. Can you comment that patch. I think @nabinhait will fix this tomorrow (if its not already been fixed)

Pushed a fix https://github.com/frappe/erpnext/commit/e6b52bbb4353ef797a83ead2a8dd2037f284cbb1

1 Like

Done. That fixed the issue. Thanks @nabinhait
:grinning:

1 Like