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
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
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.