Show Users in Role giving error?

In Setup->Role->Any Role-> Show Users. This error dialog is showing.
What can be the issue?

Traceback (most recent call last):
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/”, line 55, in application
response = frappe.handler.handle()
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/”, line 19, in handle
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/”, line 36, in execute_cmd
ret =, **frappe.form_dict)
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/”, line 879, in call
return fn(*args, **newargs)
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/desk/”, line 16, in get
data = compress(execute(**args))
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/desk/”, line 21, in execute
return DatabaseQuery(doctype).execute(*args, **kwargs)
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/model/”, line 79, in execute
result = self.build_and_run()
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/model/”, line 103, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/Users/neha/Dev/frappe-bench/apps/frappe/frappe/”, line 148, in sql
File “/Users/neha/Dev/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/”, line 205, in execute
self.errorhandler(self, exc, value)
File “/Users/neha/Dev/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘ as ‘UserRole:name’’ in ‘field list’”)

Working fine in my test account. Are you getting this error for custom Role?

@saurabh can you please check once?

No for Administrator. Issue is with columns. It is picking default columns and among them one column is invalid. Not able to figure out where these default columns for report present. For now solved it by removing that column.


This is generally the case when Custom Field is selected in the report. And later Custom Field itself is deleted. Then it starts showing error in the report. For now, you have to remove that field as a Column from the Pick Column option.

Issue closed.