1

I have a django application app in which there is a model booking and the idea is that when someone books

  • the model calculates some metrics
  • generates a plotly figure and exports it statically
  • it sends a message to the respective user via email.

Before the email had plain text. In order to test the new changes. Ive done something of this sort.

def send_notification(self):
    try:
        mail_msg = new_email()
        mail_msg.send()
    except Exception as e:
        logger.error(f"failed to send new booking mail due to {e}"
    
    mail_msg = old_mail()
    mail_msg.send()

Working, and debugging locally had no issues with using kaleido as the export engine when attaching the image to new_mail, namely.

fig.to_image("png", engine="kaleido")

Pipeline is as follows, FE book -> SQS -> send_notification()

On AWS I did not get any errors when the new code was deployed, and I also did not get any mails, not the new ones, not the old ones. After 1 hour, the 10 attempts that I've made powered through, both in email and in the logs naturally. But I just got the old emails, as I expected.

Logs show

Error initializing NSS with a persistent database (sql:/home/webapp/.pki/nssdb): /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/kaleido/executable/lib/libsqlite3.so.0)
[ERROR] failed to send new booking mail due to 'Transform failed. Error stream'

I understand that upgrading glibc standalone can break your system quite easily. I am going to try downgrading kaleido.

Is there other thing I could try to solve this? All the options I can think of are

  • downgrading kaleido (it would be amazing to check which version of glibc they require first)
  • creating a lambda just to fig.to_image()
ivanculet
  • 65
  • 5
  • Does this answer your question? [sqlite3 ERR DLOPEN FAILED version \`GLIBC\_2.29' not found](https://stackoverflow.com/questions/71894884/sqlite3-err-dlopen-failed-version-glibc-2-29-not-found) – stdunbar Jul 06 '22 at 15:36
  • Apparently this was not the issue. This error stopped showing. The delay is getting caused by kaleido not exporting appropriately Scattergeo and Cholorpeth traces. I've described in more deatil here https://github.com/plotly/Kaleido/issues/143 – ivanculet Jul 07 '22 at 20:30

0 Answers0