PlexEmail - Email Recently Added Media

@SketchDes1gns said:
if this is a simple enough question anyone can feel free to answer it for me

That discussion you reference is from June 2015.
Google no longer allows hosting of web pages on Drive, as of a few short months/days ago.
Reference Google Workspace Updates: Deprecating web hosting support in Google Drive

Google no longer allows hosting of web pages on Drive, as of a few short months/days ago.
Reference Google Workspace Updates: Deprecating web hosting support in Google Drive

ah, damn! lol

I’ve looked through this thread and haven’t found an answer as of yet. I did find a similar issue, but the resolution did not work for me.

When I set ‘email_to_send_to_shared_users’ to True, emails fail. When I set if to False it works fine. How can I correct this?
I am looking to email all users on my Plex server. Any thoughts? Thanks

Image of log output. http://oi68.tinypic.com/2r57tlj.jpg

@C.E.Waffles said:
I’ve looked through this thread and haven’t found an answer as of yet. I did find a similar issue, but the resolution did not work for me.

When I set ‘email_to_send_to_shared_users’ to True, emails fail. When I set if to False it works fine. How can I correct this?
I am looking to email all users on my Plex server. Any thoughts? Thanks

Image of log output. http://oi68.tinypic.com/2r57tlj.jpg

To use this you also need to enter you plex account username and password into the config file so that it can authenticate with the Plex service and get the list of shared users. Are plex_username and plex_password filled in and correct?

Thanks for the quick response, I had already checked this, however, I have dots in my Plex user name (same forum name), so I changed it to my email address and, bam, it worked.

Oh and Thanks for the prompt response.
Take these http://i.imgur.com/BYrw2ua.gif http://i.imgur.com/nt3Botu.gif

Hello
I found a weird situation today. I just got this message when PlexEmail run
Traceback (most recent call last):
File “/PlexEmail/scripts/plexEmail.py”, line 1021, in
imageInfo = processImage(hash, imageInfo[‘thumb’], ‘show’, 0, 0)
File “/PlexEmail/scripts/plexEmail.py”, line 343, in processImage
imgName = thumb[thumb.index(’_’) + 1:len(thumb)]
ValueError: substring not found

It has been working fine for several weeks and this is the first time I saw such error. Nothing was changed, except some new movies added. Any clue on how to solve?

@Marcelofs1 said:
Hello
I found a weird situation today. I just got this message when PlexEmail run
Traceback (most recent call last):
File “/PlexEmail/scripts/plexEmail.py”, line 1021, in
imageInfo = processImage(hash, imageInfo[‘thumb’], ‘show’, 0, 0)
File “/PlexEmail/scripts/plexEmail.py”, line 343, in processImage
imgName = thumb[thumb.index(‘_’) + 1:len(thumb)]
ValueError: substring not found

It has been working fine for several weeks and this is the first time I saw such error. Nothing was changed, except some new movies added. Any clue on how to solve?

Just an update: I could not find the problem but I noticed a new version of the script - 0.9.0. I replaced it and worked.

Thank you so much for taking your time to make this. I do have a question about an issue I am getting though.

I am seeing this in the log.

2016-10-15 23:11:43,298 - INFO:Test flag found - setting script instance to test mode. 2016-10-15 23:11:43,298 - INFO:Setting Cloudinary config values 2016-10-15 23:11:44,055 - INFO:Executing DB query: SELECT MD.id, MD.parent_id, MD.metadata_type, MD.title, MD.title_sort, MD.original_title, MD.rating, MD.tagline, MD.summary, MD.content_rating, MD.duration, MD.user_thumb_url, MD.tags_genre, MD.tags_director, MD.tags_star, MD.year, MD.hash, MD.[index], MD.studio, ME.duration, MD.originally_available_at FROM metadata_items MD LEFT OUTER JOIN media_items ME ON MD.id = ME.metadata_item_id WHERE added_at >= datetime('now', 'localtime', '-1 days', '-0 hours', '-0 minutes') AND metadata_type >= 1 AND metadata_type <= 10 ORDER BY title_sort; 2016-10-15 23:11:44,055 - ERROR:Logging an uncaught exception Traceback (most recent call last): File "C:\Users\sry9681\Downloads\PlexEmail-master\scripts\plexEmail.py", line 955, in <module> cur.execute(dbQuery) DatabaseError: file is encrypted or is not a database

I have also tried replacing the DLL’s like you have suggested prior but that didn’t help either. I can post the error that creates if you want to see it.


EDIT: I fixed it! I used the wrong DLL. I used the one that was mentioned in the plex install folder, not the official sqlight dll that i found in this thread.
Here is the link to the new DLL: http://www.sqlite.org/2015/sqlite-dll-win32-x86-3080803.zip
Extract both files into your Python install overwriting the old DLL (mine is located at “C:\Program Files (x86)\Python27\DLLs”)

Hi,
I have the intention of write a message in the footer of the web page with a link to go to my plexrequest app…
To do that I´ve doing the next things:
.- Create a new entity called web_request in the web section in config.conf file:

##Web
web_enabled = True
#This will not create the index.html file, but will still save the images to the images folder.  (Useful for when you only want to send an email)
web_only_save_images = False
web_domain = 'http://example:8080'
_web_request = 'http://example:8625'_
web_path = 'PlexEmail'
web_delete_previous_images = False
web_skip_if_no_additions = False

.- Modify the next line in Messages section in config.conf file:

msg_footer = '<a href="{web_request}" style="color: #9A9A9A !important;">If you want to make a request click here</a>'

But the script doesn´t work :(( giving this output in the log file (logging_debug_level = ‘DEBUG’):

2016-11-08 17:24:48,852 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
  File "plexEmail.py", line 1665, in <module>
    webHTML = createWebHTML()
  File "plexEmail.py", line 832, in createWebHTML
    </html>"""
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 262: ordinal not in range(128)

So, is there a way to turn my dreams into reality? Could you help me?
Thanks and best regards

Hi,
I have the intention of write a message in the footer of the web page with a link to go to my plexrequest app…
To do that I´ve doing the next things:
.- Create a new entity called web_request in the web section in config.conf file:

##Web
web_enabled = True
#This will not create the index.html file, but will still save the images to the images folder.  (Useful for when you only want to send an email)
web_only_save_images = False
web_domain = 'http://example:8080'
web_request = 'http://example:8625'
web_path = 'PlexEmail'
web_delete_previous_images = False
web_skip_if_no_additions = False

.- Modify the next line in Messages section in config.conf file:

msg_footer = '<a href="{web_request}" style="color: #9A9A9A !important;">If you want to make a request click here</a>'

But the script doesn´t work :(( giving this output in the log file (logging_debug_level = ‘DEBUG’):

2016-11-08 17:24:48,852 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
  File "plexEmail.py", line 1665, in <module>
    webHTML = createWebHTML()
  File "plexEmail.py", line 832, in createWebHTML
    </html>"""
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 262: ordinal not in range(128)

So, is there a way to turn my dreams into reality? Could you help me?
Thanks and best regards

@nickiman said:
Hi,
I have the intention of write a message in the footer of the web page with a link to go to my plexrequest app…
I did something similar in the top. It was based on something someone else had already posted in this thread earlier on. I modified the config.conf file in the ##Messages section. That’s for the basics; I also made some other cosmetic changes too, but I dont remember were they where because it was based on the other user post I previously mentioned.

@foebik said:

@nickiman said:
Hi,
I have the intention of write a message in the footer of the web page with a link to go to my plexrequest app…
I did something similar in the top. It was based on something someone else had already posted in this thread earlier on. I modified the config.conf file in the ##Messages section. That’s for the basics; I also made some other cosmetic changes too, but I dont remember were they where because it was based on the other user post I previously mentioned.

Hi @foebik and you couldn´t share your config.conf file (replacing of course all your data) or some portion of it?
Thanks a lot!

@nickiman said:

@foebik said:

@nickiman said:
Hi,
I have the intention of write a message in the footer of the web page with a link to go to my plexrequest app…
I did something similar in the top. It was based on something someone else had already posted in this thread earlier on. I modified the config.conf file in the ##Messages section. That’s for the basics; I also made some other cosmetic changes too, but I dont remember were they where because it was based on the other user post I previously mentioned.

Hi @foebik and you couldn´t share your config.conf file (replacing of course all your data) or some portion of it?
Thanks a lot!

Mine is going to a be a bit out of date, I havent updated in a while because each time I update I have to remember all these changes myself and make them anew again within the new config file. For instance, I dont have the ‘unsubscribed’ functions. But here it is, I marked out the sensitive stuff with #######. Hope it helps.

Some of the resources I used to make the changes are from DereckR back on page 18.

Hi eadwyn, I was trying to find the version number of your script to see if I need an update, but I cannot find it anywhere. I couldn’t see it in the latest release either. if it doesn’t exist, would you mind putting in the version # in the .conf file, preferably near the top where it’s easy to see?

Thanks so much

@freebeer said:
Hi eadwyn, I was trying to find the version number of your script to see if I need an update, but I cannot find it anywhere. I couldn’t see it in the latest release either. if it doesn’t exist, would you mind putting in the version # in the .conf file, preferably near the top where it’s easy to see?

Thanks so much

I use SourceTree to update my copy from git. The advantage is being able to easily see what changes are being made to determine if I need to do an update or if I can get away with just waiting.

I’m getting this error, and not sure what’s going on.

C:\Python27>python C:\plexemailnew\scripts\plexemail.py
Traceback (most recent call last):
File “C:\plexemailnew\scripts\plexemail.py”, line 9, in
import requests
ImportError: No module named requests

@“Pope Viper” said:
ImportError: No module named requests

Seems pretty obvious - you’ve not installed a prerequisite as mentioned in readme or first post.

@eadwyn said:

Prerequisites

Python 2.7 -

** Requests module for Python** . pip install requests or download it here and put it in the LIb folder of your Python installation: https://pypi.python.org/packages/source/r/requests/requests-2.5.3.tar.gz#md5=23bf4fcc89ea8d353eb5353bb4a475b1
If web reports are wanted, a web server (apache, nginx, XAMPP, WampServer, EasyPHP, lighttpd, MAMP, etc)

Any idea what’s causing my hangup?

2016-11-21 20:59:46,097 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
File “plexEmail.py”, line 1076, in
imageInfo = processImage(hash, imageInfo[‘thumb’], ‘movie’, 0, 0)
File “plexEmail.py”, line 426, in processImage
cloudinaryURL = uploadToCloudinary(imgLocation)
File “plexEmail.py”, line 484, in uploadToCloudinary
response = cloudinary.uploader.upload(imgToUpload)
File “/opt/PlexEmail/scripts/cloudinary/uploader.py”, line 16, in upload
return call_api(“upload”, params, file = file, **options)
File “/opt/PlexEmail/scripts/cloudinary/uploader.py”, line 201, in call_api
response = urllib2.urlopen(request, **kw).read()
File “/usr/lib64/python2.7/urllib2.py”, line 154, in urlopen
return opener.open(url, data, timeout)
File “/usr/lib64/python2.7/urllib2.py”, line 431, in open
response = self._open(req, data)
File “/usr/lib64/python2.7/urllib2.py”, line 449, in _open
‘_open’, req)
File “/usr/lib64/python2.7/urllib2.py”, line 409, in _call_chain
result = func(*args)
File “/opt/PlexEmail/scripts/cloudinary/poster/streaminghttp.py”, line 144, in http_open
return self.do_open(StreamingHTTPConnection, req)
File “/usr/lib64/python2.7/urllib2.py”, line 1202, in do_open
r = h.getresponse(buffering=True)
File “/usr/lib64/python2.7/httplib.py”, line 1136, in getresponse
response.begin()
File “/usr/lib64/python2.7/httplib.py”, line 453, in begin
version, status, reason = self._read_status()
File “/usr/lib64/python2.7/httplib.py”, line 409, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File “/usr/lib64/python2.7/socket.py”, line 480, in readline
data = self._sock.recv(self._rbufsize)

@justinglock40 said:
Any idea what’s causing my hangup?

2016-11-21 20:59:46,097 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
File “plexEmail.py”, line 1076, in
imageInfo = processImage(hash, imageInfo[‘thumb’], ‘movie’, 0, 0)

What Plexemail version are you using?
Searching this thread, eadwyn asks someone to try latest dev version.
Basically, my understanding, you have a corrupt/missing movie poster and therefore the script breaks.
From what I can read/understand, eadwyn tried to make it so that the script won’t choke on missing/corrupt poster images.
(realize, this is educated guessing from what I’ve read by searching for imageInfo = processImage(hash, imageInfo[‘thumb’], ‘movie’, 0, 0) in this thread…your issue may be totally off, and I’m sure someone much more knowledgeable could correct me)

@JamminR said:

@justinglock40 said:
Any idea what’s causing my hangup?

2016-11-21 20:59:46,097 - ERROR:Logging an uncaught exception
Traceback (most recent call last):
File “plexEmail.py”, line 1076, in
imageInfo = processImage(hash, imageInfo[‘thumb’], ‘movie’, 0, 0)

What Plexemail version are you using?
Searching this thread, eadwyn asks someone to try latest dev version.
Basically, my understanding, you have a corrupt/missing movie poster and therefore the script breaks.
From what I can read/understand, eadwyn tried to make it so that the script won’t choke on missing/corrupt poster images.
(realize, this is educated guessing from what I’ve read by searching for imageInfo = processImage(hash, imageInfo[‘thumb’], ‘movie’, 0, 0) in this thread…your issue may be totally off, and I’m sure someone much more knowledgeable could correct me)

I’m using version 0.9.0