Try ERPNext Buy Support Partners Foundation

Bench new-language en [custom app] returning error

Hi all,

Erpnext 12.13.0
Frappe 12.11.0

When using Bench new-language EN [Custom App] returns the below error message

Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 99, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 26, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/translate.py”, line 35, in new_language
frappe.translate.write_translations_file(app, lang_code)
File “/home/frappe/frappe-bench/apps/frappe/frappe/translate.py”, line 680, in write_translations_file
app_messages = get_messages_for_app(app)
File “/home/frappe/frappe-bench/apps/frappe/frappe/translate.py”, line 313, in get_messages_for_app
messages.extend(get_server_messages(app))
File “/home/frappe/frappe-bench/apps/frappe/frappe/translate.py”, line 466, in get_server_messages
messages.extend(get_messages_from_file(os.path.join(basepath, f)))
File “/home/frappe/frappe-bench/apps/frappe/frappe/translate.py”, line 502, in get_messages_from_file
message) for message in extract_messages_from_code(sourcefile.read(), path.endswith(".py"))]
File “/home/frappe/frappe-bench/env/lib/python3.5/codecs.py”, line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xe7 in position 475: invalid continuation byte