Hello All,
I am getting an error while fetching report in CSV format from report builder. Attaching screenshot for reference.
In excel format working fine.
Release detail:
[bench@LS27 frappe-bench]$ bench --version
4.1.0
[bench@LS27 frappe-bench]$ bench version
bench_manager 0.0.1
erpnext 11.1.38
frappe 12.x.x-develop
Fetch the file in excel format and then Save-As?
Trent’s suggestion may work.
But expect problems since your branches do not match - erpenxt is on master while frappe is on develop
@clarkej thanks for your reply. As per your suggestion, I changed the branches and did the same (for erpnext and frappe) but no luck. still getting same error.
[bench@LS27 frappe-bench]$ bench version
bench_manager 0.0.1
erpnext 11.1.47
frappe 11.1.42
ok to recompile the lot may help
frappe@erpnext:~/frappe-bench$ find . -name '*.pyc' | xargs rm -f
I am using Japanese if I changed the python version as 2.7 then it works but while open CSV file in excel it shows the encoding issue,
If I use python 3.6 it gives the same error as mentioned above. please help me out.
I can’t say what the problem is here perhaps Japanese locale related.
To set a debug breakpoint in the for loop in export_query, to view the data, would help identify first hand say the line in the export file that is causing the problem.
"""Add columns for aggregated values e.g. count(name)"""
if data.group_by and data.aggregate_function:
if data.aggregate_function.lower() not in ("count", "sum", "avg"):
frappe.throw(_("Invalid aggregate function"))
if frappe.db.has_column(data.aggregate_on_doctype, data.aggregate_on_field):
data.fields.append(
"{aggregate_function}(`tab{aggregate_on_doctype}`.`{aggregate_on_field}`) AS _aggregate_column".format(
**data
)
)
if data.aggregate_on_field:
data.fields.append(f"`tab{data.aggregate_on_doctype}`.`{data.aggregate_on_field}`")
else:
raise_invalid_field(data.aggregate_on_field)
data.pop("aggregate_on_doctype")
data.pop("aggregate_on_field")
data.pop("aggregate_function")
best wishes