Query function in perspective transform script

Hi,
runNamed Query function below is working in script console but not in perspective transform script :

devs=system.db.runNamedQuery("dbmanager/devices", {"project":2})

It shows me a parse error.

I don’t understand. Do you have a solution ?
Thanks,