diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index adb7bc1338..1e694e7e3a 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -78,6 +78,7 @@ def get_chart(chart_template, existing_company=None): for folder in folders: path = os.path.join(os.path.dirname(__file__), folder) for fname in os.listdir(path): + fname = frappe.as_unicode(fname) if fname.endswith(".json"): with open(os.path.join(path, fname), "r") as f: chart = f.read() @@ -105,6 +106,7 @@ def get_charts_for_country(country): path = os.path.join(os.path.dirname(__file__), folder) for fname in os.listdir(path): + fname = frappe.as_unicode(fname) if (fname.startswith(country_code) or fname.startswith(country)) and fname.endswith(".json"): with open(os.path.join(path, fname), "r") as f: _get_chart_name(f.read())