Report Error : Item Wise Purchase History

Hi,

I encountered this error when trying to load Item-Wise Purchase Register/History report:

Traceback (innermost last):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py”, line 51, in application
response = frappe.handler.handle()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 66, in handle
execute_cmd(cmd)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 741, in call
return fn(*args, **newargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 87, in run
columns, result = frappe.get_attr(method_name)(frappe._dict(filters))
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py”, line 14, in execute
item_list = get_items(filters)
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py”, line 76, in get_items
order by pi.posting_date desc, pi_item.item_code desc""" % (conditions, match_conditions), filters, as_dict=1)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database.py”, line 132, in sql
self._cursor.execute(query, values)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘.expense_account, pi_item.qty, pi_item.base_net_rate, pi_item.base_net_amount, p’ at line 4”)

Pushed the fix

@nabinhait, run bench update?

I’m using v5…