Not found : The resource you are looking for is not available

While using simple select query to fetch data, system gives me error as “The resource you are looking for is not available” in my custom App.

Below is my sample code

In PY file

from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _

class TaskTracker2(Document):

    def get_data():
         return frappe.db.sql("""select name from `tabDepartment`""")
        # return 123;

In JS file

//Call API to get Task Info{
		method: 'task_management.task_management.doctype.task_tracker_2.task_tracker_2.get_data',
		callback: function (data) {

What’s wrong here???

Try to keep your whitelisted method out of the class declaration and indent it towards the left.

1 Like

Its done…