I got an error while following meeting app in frappe framework course
sendmail() got an unexpected keyword argument ‘as_bulk’
My code:
@frappe.whitelist()
def send_invitation_emails(meeting):
meeting = frappe.get_doc(“Meeting”, meeting)
meeting.check_permission(“email”)
if meeting.status == "Planned":
frappe.sendmail(
recipients=[d.attendee for d in meeting.attendees],
sender=frappe.session.user,
subject=meeting.subject,
message=meeting.invitation_message,
reference_doctype=meeting.doctype,
reference_name=meeting.name,
as_bulk=True
)
meeting.status = "Invitation Sent"
meeting.save()
frappe.msgprint(_("Invitation Sent"))
else:
frappe.msgprint(_("Meeting Status must be 'Planned'"))
You can remove as_bulk =True from send_mail() function. As such errors occurred when function has not argument which you’re passing.
@Hardik_Zinzu , I have same problem, but this problem occurred in standard meeting api file how to override this?
Please explain a bit more ! Which meeting API you’re talking about ?
As per mentioned @Ramki_Marichamy the file path is apps/meeting/meeting/api.py
For now i directly removed as_bulk=True but this is standard file but future meeting app release how to handle this?
On which version you’re working. Please mention it so I can check it and get back to you
Yeah sure,
ERPNext: v14.18.2 (version-14)
Frappe Framework: v14.27.0 (version-14)
Frappe HR: v14.1.0 (version-14)
India Compliance: v14.2.1 (version-14)
Frappe LMS: v0.0.1 (main)
meeting: v0.0.1 (master)