Sendgrid-python: for the love of god make it clear in the docs to base64 encode data before passing to attachment function

Created on 17 Jan 2018  路  5Comments  路  Source: sendgrid/sendgrid-python

Issue Summary

A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.

Steps to Reproduce

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?

Technical details:

  • sendgrid-python Version: master (latest commit: [commit number])
  • Python Version: X.X
easy good first issue help wanted help wanted docs update up for grabs up-for-grabs

All 5 comments

@carnal0wnage,

Thanks for the heads up! Which docs were you looking at?

With Best Regards,

Elmer

hey sorry for the frustration issue post. I've been looking at the docs in this repo specifically

https://github.com/sendgrid/sendgrid-python/blob/master/examples/helpers/mail/mail_example.py line 82

which makes sense that it's b64 encode after you know it but wasnt clear to me at first that it needed to be. Even making a comment in the code to pass a b64 encode blob to the attachment.content piece would probably help someone out later.

Hi @carnal0wnage,

No worries, I view frustration posts as an opportunity to be better :) I'm glad you took the time to respond. I'm going to re-open this, so we can fix that documentation.

Here is where I would have hoped you would look. We clearly have to do better with guiding people to the appropriate documentation. Do you mind sharing the path you took that landed you to the example above?

Thanks!

yup that would have saved me some time. not sure how i missed it and ended up on that other example. thanks tons

how i got there. I searched for "sengrid python example" and it was the 2nd result the first being the main project page.

Ah nice, thanks for the follow up @carnal0wnage!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sohamnavadiya picture sohamnavadiya  路  4Comments

DougCal picture DougCal  路  3Comments

c-w picture c-w  路  4Comments

jeffoneill picture jeffoneill  路  4Comments

inputjoker picture inputjoker  路  4Comments