Data Import Tool error in V11

Hi All,

Data Import Tool fails with following error:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 67, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 53, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 53, in execute_cmd
return, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 940, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/”, line 295, in get_template
xlsx_file = make_xlsx(reader, “Data Import Template”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 43, in make_xlsx
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/openpyxl/workbook/”, line 365, in save
save_dump(self, filename)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/openpyxl/writer/”, line 313, in save_dump
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/openpyxl/writer/”, line 266, in save
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/openpyxl/writer/”, line 73, in write_data
archive.writestr(ARC_ROOT_RELS, write_root_rels(self.workbook))
File “/usr/lib/python3.5/”, line 1581, in writestr
TypeError: string argument expected, got ‘bytes’

Any idea how to solve this issue?


The error comes out when trying to download excel template.
It works for .csv but not for excel.

Looks like a Python 3 issue. Dispatching a fix. :smile:

Any chance to get a fix soon?


When running python --version it reports Python 2.7.12.