Why is the 'key' object causing issues with attachments in the 'send_email' module of Gmail developer?

I’ve had to part it up i’m afraid.