File “apps/frappe/frappe/utils/safe_exec.py”, line 81, in safe_exec
exec(
File “”, line 1, in
ImportError: import not found
My code is
import frappe
from frappe.utils import getdate, today
def send_birthday_email():
# Customize the email content
subject = _("Happy Birthday!")
message = _("{getdate(today())}Dear ,\n\nWishing you a fantastic birthday!")
# Send the email
frappe.sendmail(
recipients="xxxx@gmail.com",
subject=subject,
message=message
)
send_birthday_email()
Traceback (most recent call last):
File “apps/frappe/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py”, line 94, in execute
frappe.get_doc(“Server Script”, script_name).execute_scheduled_method()
File “apps/frappe/frappe/core/doctype/server_script/server_script.py”, line 114, in execute_scheduled_method
safe_exec(self.script)
File “apps/frappe/frappe/utils/safe_exec.py”, line 72, in safe_exec
exec(compile_restricted(script), exec_globals, _locals) # pylint: disable=exec-used
File “”, line 1, in
ImportError: import not found
Is there any Update on this error, i am also getting the same error while setting server script with the scheduler!