PlexEmail - Email Recently Added Media

@yodandy said:
Having an issue running the email script, here’s the log:
The part that stood out was: “winner-take-all battle of their lives”, which seems to be metadata for the movie ‘Warrior’. I have removed this movie from my plex collection, update library, tried the script again, same error. I tried to change the metadata, unmatch, rematch, even remove this line from the metadata and it still prevails.

Any ideas? Thanks!

Hmm, do you have a custom media scanner? Somehow the thumb field looks like it was corrupted and contains part of the summary like you said.

I am getting runtime: 0 minutes for new tv seasons and new tv shows, but it will populate correctly for new tv episodes. Any idea how to either populate correctly or just remove runtime from TV seasons and shows but leave it for epsidoes?

Is there a way to send an email AS SOON AS content is added instead of a time-based “report”?

@seanvree@hotmail.com said:
Is there a way to send an email AS SOON AS content is added instead of a time-based “report”?

No, and honestly, I wouldn’t want this app to do that. My box would be flooded with emails.
If you want immediate notifications, I’d recommend plexpy.
Even if you didn’t want it’s included notification methods, it has a scriptable notification that you could program to run the plexemail script if wanted.

@eadwyn said:

@yodandy said:
Having an issue running the email script, here’s the log:
The part that stood out was: “winner-take-all battle of their lives”, which seems to be metadata for the movie ‘Warrior’. I have removed this movie from my plex collection, update library, tried the script again, same error. I tried to change the metadata, unmatch, rematch, even remove this line from the metadata and it still prevails.

Any ideas? Thanks!

Hmm, do you have a custom media scanner? Somehow the thumb field looks like it was corrupted and contains part of the summary like you said.

I ended restoring a backup of my metadata database, and it solved the issue. :shrugs:

Hi,
This week I´m having this issue when the script runs:
2016-09-02 17:01:55,833 - ERROR:Logging an uncaught exception Traceback (most recent call last): File "/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts/plexEmail.py", line 1644, in <module> emailHTML = createEmailHTML() File "/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts/plexEmail.py", line 632, in createEmailHTML emailText += emailMovies + '<br/>&nbsp;' UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3037: ordinal not in range(128)
These are the only errors after change the log level to “DEBUG”:

About the setup:
PlexEmail script version 0.8.7
PMS version: 1.1.3.2700

If you need anything else just let me know.
Thanks and best regards.

Anyone having problems with this since upgrading PMS to 1.1.3? I’m running PlexEmail 0.8.7 and everything has been working fine, sending an e-mail on Sunday night at 23:59.

No e-mail today, so had a quick look and if I run the script I don’t get any error messages, but neither do I get a confirmation to say it’s complete. Web page doesn’t update and no e-mails sent.

Only thing that’s changes is an upgrade from 1.0.3 to 1.1.3 on PMS and the whole server was rebooted after upgrading the PSU.

Forgot about the new logging functionality, so this what’s in the log file:

2016-09-05 12:04:59,479 - INFO:Test flag found - setting script instance to test mode.                                              
2016-09-05 12:04:59,479 - INFO:Setting Cloudinary config values                                                                     
2016-09-05 12:04:59,479 - INFO:Including Plex Web Link - Getting machine identifier from the DLNA DB                                
2016-09-05 12:04:59,479 - INFO:DLNA_DB_FILE = /plexms/Plex Media Server/Plug-in Support/Databases/com.plexapp.dlna.db               
2016-09-05 12:04:59,479 - ERROR:Logging an uncaught exception                                                                       
Traceback (most recent call last):                                                                                                  
  File "/PlexEmail/scripts/plexEmail.py", line 903, in <module>                                                                     
    cur.execute('SELECT machine_identifier FROM remote_servers WHERE url LIKE "http://127.0.0.1%";')                                
OperationalError: unable to open database file

This has to have something to do with Plex Inc. forcing signing of client apps?

@nickiman said:
Hi,
This week I´m having this issue when the script runs:
2016-09-02 17:01:55,833 - ERROR:Logging an uncaught exception Traceback (most recent call last): File "/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts/plexEmail.py", line 1644, in <module> emailHTML = createEmailHTML() File "/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts/plexEmail.py", line 632, in createEmailHTML emailText += emailMovies + '<br/>&nbsp;' UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3037: ordinal not in range(128)
These are the only errors after change the log level to “DEBUG”:

About the setup:
PlexEmail script version 0.8.7
PMS version: 1.1.3.2700

If you need anything else just let me know.
Thanks and best regards.

Hi,
Forget my post I´ve found what was the problem.
Regards

Any idea what’s causing this?

[root@freenas ~]# jexec plexemail python2.7 /PlexEmail/scripts/plexEmail.py -t Traceback (most recent call last): File "/PlexEmail/scripts/plexEmail.py", line 11, in <module> import cloudinary File "/PlexEmail/scripts/cloudinary/__init__.py", line 15, in <module> from cloudinary import utils File "/PlexEmail/scripts/cloudinary/utils.py", line 3, in <module> import cloudinary File "/PlexEmail/scripts/cloudinary/cloudinary/__init__.py", line 15, in <modu le> from cloudinary import utils ImportError: cannot import name utils [root@freenas ~]#

Here is the error Im getting as well guys.

6-09-05 17:19:46,382 - INFO:Test flag found - setting script instance to test mode.
2016-09-05 17:19:46,382 - INFO:Including Plex Web Link - Getting machine identifier from the DLNA DB
2016-09-05 17:19:46,382 - INFO:DLNA_DB_FILE = C:\Users\User\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.dlna.db
2016-09-05 17:19:46,382 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
File “plexEmail.py”, line 903, in
cur.execute(‘SELECT machine_identifier FROM remote_servers WHERE url LIKE “http://127.0.0.1%”;’)
DatabaseError: file is encrypted or is not a database

Plz Ignore this was a DLL issue

I’m getting this error since the last update of Plex Media Server. I think the problem is because the last update of PMS, I don’t know.

Traceback (most recent call last): File "C:\PlexEmail-master\scripts\plexEmail.py", line 823, in <module> imageInfo = processImage(hash, imageInfo['thumb'], 'show', 0, 0) File "C:\PlexEmail-master\scripts\plexEmail.py", line 237, in processImage imgName = thumb[thumb.index('_') + 1:len(thumb)] ValueError: substring not found

Can someone help me?

Where is the Web folder that you speak of in the Windows Installation?

@sry9681 said:
Where is the Web folder that you speak of in the Windows Installation?

It’s for me? I have the web option “disabled”.

You should fine the web folder inside the PlexEmail folder, along with the scripts folder.

Where you move the files to depends on the web server you are using and how you’ve configured it.

It’s all still broken for me since PMS 1.1.3 :frowning:

@adrianwi said:
You should fine the web folder inside the PlexEmail folder, along with the scripts folder.

Where you move the files to depends on the web server you are using and how you’ve configured it.

It’s all still broken for me since PMS 1.1.3 :frowning:

But I don’t have a web for plexEmail. I use only cloudnary and send email to 10 people. The error is because the update of PMS?

@leisan2 said:
I’m getting this error since the last update of Plex Media Server. I think the problem is because the last update of PMS, I don’t know.

Traceback (most recent call last): File "C:\PlexEmail-master\scripts\plexEmail.py", line 823, in <module> imageInfo = processImage(hash, imageInfo['thumb'], 'show', 0, 0) File "C:\PlexEmail-master\scripts\plexEmail.py", line 237, in processImage imgName = thumb[thumb.index('_') + 1:len(thumb)] ValueError: substring not found

Can someone help me?

You look like you are on a very old version. Can you download the latest code and try it again?

@adrianwi said:
You should fine the web folder inside the PlexEmail folder, along with the scripts folder.

Where you move the files to depends on the web server you are using and how you’ve configured it.

It’s all still broken for me since PMS 1.1.3 :frowning:

Asked you a question on the github issue you created.

Scrap that it’s working perfectly

The biggest fix in this release is regarding missing posters for TV Shows. If you are having issues with missing posters, please take this release and let me know if you are seeing any issues around posters.

v0.9.0 Released

Bug Fixes

  • Fixed an issue with posters that were not always appearing properly.
  • Fixed an issue with logging that was causing the script to break

New Features

  • Added the ability to set plex server guid in the config file instead of getting it from the DNLA db.

Download here: https://github.com/jakewaldron/PlexEmail/releases/latest

I’m going to apologise if I’ve missed something really simple here but a little new to using scripts and whatnot (though I am otherwise generally computer savvy)

I’ve seen to all the pre-reqs, installed python, dealt with the requests and such then gone and started editing the config (with notepad++)

straight away it stops and comes up with

C:\PlexEmail\Scripts>python plexEmail.py
Traceback (most recent call last):
File “plexEmail.py”, line 864, in
execfile(configFile, config)
ValueError: invalid \x escape

locations are as follows…

plexemail running from c:\plexemail\scripts
requests put into C:\Python27\Lib\requests-2.5.3
sqlite here C:\Python27\DLLs
I’ve installed xammp though have no intention of using web (was just because I was trying everything)
thats here C:\xampp

I’ve then gone and edited the config as such (with everything else left as is)…

plex_data_folder = ‘C:\Users\Andy\AppData\Local\Plex Media Server’
(also tried ‘C:\Program Files (x86)\Plex\Plex Media Server’ just in case - nope)
web_folder = ‘C:\xampp\htdocs’
(though I wont be using it)

logging left as is
plex details filled in
tried username as both login name and email

cloudinary = True
with api and secret etc filled in

web_enabled = False
web_only_save_images = True
web_domain = ‘’
web_path = ‘plexemail’
web_delete_previous_images = False
web_skip_if_no_additions = False

email_enabled = True
email_individually = True
email_use_bcc = False

I put 2 emails into ‘email to’ just to check as ‘blah@blah.com’, ‘blah2@blah.com’
shared users = False
I even put all of the other email addresses (except the two above) into unsubscribe just in case it went wrong and used them anyway

email_smtp_address = ‘smtp.gmail.com
email_smtp_port = 587
email_use_ssl = False #Port must be an SSL port i.e. 465
email_username = ‘myfullemailaddress’
email_password = ‘itspassword’

I then left everything else as it was (filtering and such wise - figured I’d change that later)

this is giving me a massive headache and just cant figure out where I’m going wrong - any help would be hugely appreciated.
I’m sure I cant be this much of an idiot but it appears that I’m missing something fairly obvious to someone here because its not even ‘trying’ to do anything

:frowning: