Custom App not installed

Hi
Busy creating my own App. Untill now, I have done the coding on the client side
( client script for JS and server-script for PY ). I need to start porting this to the
backend. But now, whenever I call my python function, I get an error…

Message
App my_app is not installed
Failed to get method for command .........

and then it lists the python-method that I am calling.

The way I am calling it …

frappe.call({
    method: "my-app.my-app.doctype.an.an.rotate_an",

It concerns me that it says my App is not installed. And yet when I create the
doctypes, I create it for my-app.

and top-right under “About” my-app is listed ???

Also, “installed modules” shows my-app ???

Does anyone have some advise , please ?

try running bench update

make sure rotate_an is a @frappe.whitelist() function

 
import frappe

@frappe.whitelist()
def rotate_an():
    return "Method executed successfully"

If you are still getting error then open your console in code editor

bench --site your-site-name console

test importing and calling the method manually:

from my_app.my_app.doctype.an.an import rotate_an
rotate_an()