Server Error when I goto Purchase Order Trends

First I would like to appreciate and congratulate ERPNext team on making such wonderful transitions, intuitive modules and accomplishing new goals through this time. I wish you all the best in future.

I get the Following Message when i goto to Purchase Order trends in Analytic. Same case happens in Sale Order Trends Kindly Help!

“Server Error: Please check your server logs or contact tech support.”

Traceback (innermost last):
File “/home/server/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/server/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/server/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/server/frappe-bench/apps/frappe/frappe/init.py”, line 805, in call
return fn(*args, **newargs)
File “/home/server/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 88, in run
columns, result = frappe.get_attr(method_name)(frappe._dict(filters))
File “/home/server/frappe-bench/apps/erpnext/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py”, line 12, in execute
data = get_data(filters, conditions)
File “/home/server/frappe-bench/apps/erpnext/erpnext/controllers/trends.py”, line 115, in get_data
(filters.get(“company”), filters.get(“fiscal_year”)), as_list=1)
File “/home/server/frappe-bench/apps/frappe/frappe/database.py”, line 136, in sql
self._cursor.execute(query, values)
File “/home/server/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/server/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘t1.fiscal_year’ in ‘where clause’”)

Latest updates removed the fiscal year field from most docs including purchase order. I believe some recent updates fix those reports.

hank you for the prompt reply. I have recently installed ERPNext: v6.27.1 Frappe Framework: v6.27.2

through Easy install and also ran bench update but the problem still
persists. Is there any other way to update ERPnext?
I am also getting server error in Attendance tool of some Unknown string format.

Error Report Python 2.7.6: /home/server/frappe-bench/env/bin/python
(prefix: /home/server/frappe-bench/env) Timestamp: 2016-03-18
15:29:10.005691Relapsed3 Exception args (u’Unknown string format’,)
message Unknown string format Locals default
datetime.datetime(2016, 3, 18, 0, 0) effective_dt
datetime.datetime(2016, 3, 18, 15, 29, 9, 958242) ignoretz False
kwargs {} res None self
skipped_tokens None timestr
u’Today’ tzinfos None Traceback
/home/server/frappe-bench/apps/frappe/frappe/app.py: 57 55 56
if frappe.local.form_dict.cmd: 57 response =
frappe.handler.handle() 58 59 elif
frappe.request.path.startswith(“/api/”):
/home/server/frappe-bench/apps/frappe/frappe/handler.py: 19 17
18 if cmd!=‘login’: 19 execute_cmd(cmd) 20 21 return
build_response(“json”)
/home/server/frappe-bench/apps/frappe/frappe/handler.py: 36 34
is_whitelisted(method) 35 36 ret = frappe.call(method, *frappe.form_dict)
37 38 # returns with a message
/home/server/frappe-bench/apps/frappe/frappe/init.py: 805 803
del newargs[“flags”] 804 805 return fn(args, **newargs)
806 807 def make_property_setter(args, ignore_validate=False,
validate_fields_for_doctype=True):
/home/server/frappe-bench/apps/erpnext/erpnext/hr/doctype/employee_attendance_tool/employee_attendance_tool.py:
23 21 marked_employee = {} 22 for emp in
frappe.get_list(“Attendance”, fields=[“employee”, “status”], 23
filters={“att_date”: date}): 24
marked_employee[emp[‘employee’]] = emp[‘status’] 25
/home/server/frappe-bench/apps/frappe/frappe/init.py: 926 924
“”" 925 import frappe.model.db_query 926 return
frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args,
**kwargs) 927 928 def get_all(doctype, *args, **kwargs):
/home/server/frappe-bench/apps/frappe/frappe/model/db_query.py:
66 64 result = self.run_custom_query(query) 65 else:
66 result = self.build_and_run() 67 68 if
with_comment_count and not as_list and self.doctype:
/home/server/frappe-bench/apps/frappe/frappe/model/db_query.py: 74
72 73 def build_and_run(self): 74 args =
self.prepare_args() 75 args.limit = self.add_limit() 76

/home/server/frappe-bench/apps/frappe/frappe/model/db_query.py: 89
87 self.extract_tables() 88 self.remove_user_tags() 89
self.build_conditions() 90 91 args = frappe.dict() /home/server/frappe-bench/apps/frappe/frappe/model/dbquery.py:
212 210 self.conditions = [] 211
self.grouped_or_conditions = [] 212
self.build_filter_conditions(self.filters, self.conditions) 213
self.build_filter_conditions(self.or_filters,
self.grouped_or_conditions) 214
/home/server/frappe-bench/apps/frappe/frappe/model/db_query.py: 230
228 conditions.append(f) 229 else: 230
conditions.append(self.prepare_filter_condition(f)) 231 232
def prepare_filter_condition(self, f):
/home/server/frappe-bench/apps/frappe/frappe/model/db_query.py: 261
259 260 if df and df.fieldtype==“Date”: 261 value =
getdate(f.value).strftime(“%Y-%m-%d”) 262 fallback =
“‘0000-00-00’” 263
/home/server/frappe-bench/apps/frappe/frappe/utils/data.py: 39 37
return None 38 39 return parser.parse(string_date).date()
40 41 def get_datetime(datetime_str=None):
/home/server/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py:
1161 1159 return parser(parserinfo).parse(timestr,
**kwargs) 1160 else: 1161 return
DEFAULTPARSER.parse(timestr, **kwargs) 1162 1163

/home/server/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py:
552 550 551 if res is None: 552
raise ValueError(“Unknown string format”) 553 554 if
len(res) == 0: