Email body cannot be read when there are attachments
- Dominant language
- Python
- Stars
- 273
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
I am able to read the body of an email when there are no attachments. However, when I add in a few attachments like a pdf, jpg or a PNG file I am not able to read the email body using the .body attribute. I get an error instead - 'AttributeError: 'GmailMessage' object has no attribute 'body'(see the picture below) :

I have also tried to attach smaller files in the hope that it will work, but to no avail.
May I know if there is any way to solve this problem?
Thank you.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with a GmailMessage containing PDF, JPG, or PNG attachments and inspect how its .body attribute is populated. Confirm the behavior for messages without attachments, then verify that the body remains readable when attachments are present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100