jakewaldron / PlexEmail

This script aggregates all new TV, movie and music releases for the past configured time then optionally writes to your web directory and sends out an email.
206 stars 32 forks source link

[BUG] Line 353: TypeError: Could not guess image MIME subtype #6

Closed lmb56 closed 8 years ago

lmb56 commented 8 years ago

File "C:\PlexEmail\scripts\plexEmail.py", line 353, in sendMail msgImage = MIMEImage(fp.read()) File "C:\Python27\lib\email\mime\image.py", line 43, in init raise TypeError('Could not guess image MIME subtype') TypeError: Could not guess image MIME subtype

I have in the script made a temporary workaround:

Earlier: msgImage = MIMEImage(fp.read()) Now: msgImage = MIMEImage(fp.read(),_subtype="png")

The issue could be due to some UTF-8 stuff. I may have the danish letters æ,ø,å in some of the naming of objects.

jakewaldron commented 8 years ago

Thanks for this report. I've updated the code to fix this issue and will commit it sometime this week when I add a couple other fixes/features.

jakewaldron commented 8 years ago

Fixed in v0.7.0.