PlexEmail - Email Recently Added Media

@justinglock40 - no, sorry, what I meant is are you using/have you tried the development branch?
But, that discussion I found was from August I think. Eadwyn has merged the changes he was discussing into the Sept 19th o .9.0. release.
Other than verifying posters are available for content you added during the timeframe your script looks for, I really don’t know how to help further, sorry.

@JamminR It’s all good I got it figured out and everything is copasetic

@justinglock40 - Good to hear. Was it a broken image? Have any tip for anyone that gets that error in the future?

@JamminR Yea it was a broken file. I ended up having to go to the file and “unmatch” it so that Plex would remove the current metadata and afterwards I “matched” it again and all was well. Also I think it may have been happending also because I was exiting out if the script too fast during testing that I may not have actually saw if it was actually working. I didn’t put together that since I had just set-up my new box that it would have to upload and email all those images since they were all considered “recently added.”

Having a issue with the script. Here is where it stops.
Traceback (most recent call last):
File “C:\PlexEmail-master\scripts\plexEmail.py”, line 9, in
import requests
ImportError: No module named requests

@Jay78412 said:
Having a issue with the script. Here is where it stops.
Traceback (most recent call last):
File “C:\PlexEmail-master\scripts\plexEmail.py”, line 9, in
import requests
ImportError: No module named requests

You need to install the Requests module for PHP as per the Prerequisites.

I have the requests-2.5.3.tar in the Lib folder

@Jay78412 said:
I have the requests-2.5.3.tar in the Lib folder

isaacrdz is correct, something still going sideways for you with the Request module. I would focus your trouble shooting around that area. Maybe do a pip install of it.

I fixed the Request Mod. Now I am getting this

Traceback (most recent call last):
File “C:\PlexEmail-master\scripts\plexEmail.py”, line 1695, in
success = sendMail(’’)
File “C:\PlexEmail-master\scripts\plexEmail.py”, line 563, in sendMail
server = smtplib.SMTP_SSL(smtp_address, smtp_port)
File “C:\Python27\lib\smtplib.py”, line 801, in init
SMTP.init(self, host, port, local_hostname, timeout)
File “C:\Python27\lib\smtplib.py”, line 256, in init
(code, msg) = self.connect(host, port)
File “C:\Python27\lib\smtplib.py”, line 316, in connect
self.sock = self._get_socket(host, port, self.timeout)
File “C:\Python27\lib\smtplib.py”, line 807, in _get_socket
new_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile)
File “C:\Python27\lib\ssl.py”, line 933, in wrap_socket
ciphers=ciphers)
File “C:\Python27\lib\ssl.py”, line 601, in init
self.do_handshake()
File “C:\Python27\lib\ssl.py”, line 830, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

Hi,

Would this script be possible to run on a another client that is not running the plex server?

EDIT: It works with mount!

Thanks!

Im getting an error in the logfile. It seems to be something related to characters. Im using swedish characters, such as Å Ä Ö å ä ö. I see in config.conf it says “# This Python file uses the following encoding: utf-8” But i have no clue how to change it or find another solution for it.

Here is the error from the logfile:

2017-01-10 00:56:20,953 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
File “plexEmail.py”, line 1261, in
emailTVSeasons += emailText
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 211: ordinal not in range(128)

EDIT: I got the script working now. I got the email. But I had to change all the swedish characters to non swedish. So if anyone has a solution to get this working I would be more than happy!

It seems to be a issue with the encoding in only certain places of the script. I have swedish characters is some places and it works fine but in other places it would render in the script not sending any emails.

Thanks!

Anyway to add a donations button to the email? I see the Header 3, but not sure how to get the coded button in there properly.

Seems like this is a more or less dead project from the creators side, sadly. Its a nice and good script! I hope he gets the time and will to continue this!

@Mark7even said:
Anyway to add a donations button to the email? I see the Header 3, but not sure how to get the coded button in there properly.

You can pretty much add whatever you want - I added a button to take people to an online request form. I’m not great at HTML, so I just googled “html button code”. Trial and error worked well enough for me.

@nonadz - though perhaps feature wise nothing’s been updated in a while, the script works perfectly fine for most situations.
Plex overall is mostly utf-8, and this script, like many other python scripts, really doesn’t like anything but utf-8, which rules out many foreign language ascii characters in both config and title names, but, that’s not so much blame on the dev as it is the nature of the python beast, and honestly, web in general.

Anyone had a “550 Maximum line length exceeded” error from their mail provider when sending weekly e-mails from PlexMail? All mine bounced back last night with this error, otherwise it’s been working wonderfully in the background for months. I’m wondering if one of the descriptions was exceptionally long this week, or whether it’s something more serious?

Anyone ever try sorting their movies, shows, and anything else by the air date?

Considering it’s one of the options you can turn on or off for each section, I’m surprised it’s not a sorting option. I took a look at the code to see if I could somehow understand how sorting is handled, but I’ll end up breaking something before I make it better :slight_smile:

Odd… I added air_date to the sorting value and it’s just working by itself… never mind then!

So… I set this up today and it seems to go through without any error. However, I don’t receive any email notification and the only error I can see is something about a size issues. I’ve posted the log. Thanks for any help.

plexemail/images/028c180043414469a0f2cd5ca8c1d84245c29c8d_56c6f9a8e5ba917ab74d8ee54789124ffa9af57f.jpg
2017-02-09 18:15:26,703 - INFO:processImage: img = plexemail\images\028c180043414469a0f2cd5ca8c1d84245c29c8d_56c6f9a8e5ba917ab74d8ee54789124ffa9af57f.jpg
2017-02-09 18:15:26,703 - INFO:processImage: Uploading to cloudinary
2017-02-09 18:15:26,703 - INFO:uploadToCloudinary: begin
2017-02-09 18:15:26,703 - INFO:uploadToCloudinary: start upload to cloudinary
2017-02-09 18:15:28,029 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
File “D:\PlexEmail-0.9.0\scripts\plexEmail.py”, line 1396, in
imageInfo = processImage(hash, imageInfo[‘thumb’], ‘artist’, 0, 0)
File “D:\PlexEmail-0.9.0\scripts\plexEmail.py”, line 426, in processImage
cloudinaryURL = uploadToCloudinary(imgLocation)
File “D:\PlexEmail-0.9.0\scripts\plexEmail.py”, line 484, in uploadToCloudinary
response = cloudinary.uploader.upload(imgToUpload)
File “D:\PlexEmail-0.9.0\scripts\cloudinary\uploader.py”, line 16, in upload
return call_api(“upload”, params, file = file, **options)
File “D:\PlexEmail-0.9.0\scripts\cloudinary\uploader.py”, line 223, in call_api
raise Error(result[“error”][“message”])
Error: File size too large. Got 12251788. Maximum is 10485760.

@nsw968 - indeed. The image your server is trying to upload to cloudinary is !! 12megabytes !!.
For free file hosting, that’s too big. I’m surprised is even using that size a file.
Cloudinary limits to 10mb.
Not sure how to fix your issue though, or determine what video has that size a poster, if it’s Plex that has downloaded the image as a poster.