import frappe
from frappe.model.document import Document
class ServersideScripting(Document):
def validate(self):
frappe.throw("hello")
when I try to run this script from serverside scripting it throws the following error:
import frappe
Traceback (most recent call last):
File "/opt/bench/frappe-bench/apps/frappe/frappe/programming_module/doctype/serverside_scripting/serverside_scripting.py", line 5, in <module>
from frappe.model.document import Document
ModuleNotFoundError: No module named 'frappe.model'
Where as the model exist in frappe at the following path /opt/bench/frappe-bench/apps/frappe/frappe
I tried changing the path in ~/.bashrc file still, import error occurs