Ребят привет юзаю sendgrid и отправляют таску в селери но селери возвращает мне ошибку, помогите плз:)
billiard.pool.MaybeEncodingError: Error sending result: ''(1, <ExceptionInfo: BadRequestsError("<HTTPError 400: \'Bad Request\'>",)>, None)''. Reason: ''PicklingError("Can\'t pickle <class \'python_http_client.exceptions.BadRequestsError\'>: it\'s not the same object as python_http_client.exceptions.BadRequestsError",)''.
@app.task
def send_email_registration(ToEmail, password):
sg = sendgrid.SendGridAPIClient(apikey='a')
from_email = Email("@
ukr.net")
to_email = Email(email)
subject = "ITS from me"
content = Content(f"hello you are registered ist you password:{password}")
mail = Mail(from_email, subject, to_email, content)
response =
sg.client.mail.send.post(request_body=mail.get())
print(response.status_code)
print(response.body)
print(response.headers)
этот же код отдельно выполняентся и все ок