PlexEmail - Email Recently Added Media

I am trying to install plexemail on os x, however much to my dismay (or shame :">) I am stuck right at the beginning configuring the location of the Plex data folder:

Config.conf:
Mac Example: ‘/Users/{User Name}/Library/Application Support/’
plex_data_folder = ‘/Users/Kenneth/Library/Application Support/’

Console output:
Traceback (most recent call last):
File “plexEmail.py”, line 676, in
execfile(configFile, config)
File “/Applications/PlexEmail-master/scripts/config.conf”, line 6
plex_data_folder = ‘/Users/Kenneth/Library/Application Support/’
^
SyntaxError: invalid syntax

Your help in pointing out what I am doing wrong here is much appreciated!

@Kenneth Spronk said:
I am trying to install plexemail on os x, however much to my dismay (or shame :">) I am stuck right at the beginning configuring the location of the Plex data folder:

Config.conf:
Mac Example: ‘/Users/{User Name}/Library/Application Support/’
plex_data_folder = ‘/Users/Kenneth/Library/Application Support/’

Console output:
Traceback (most recent call last):
File “plexEmail.py”, line 676, in
execfile(configFile, config)
File “/Applications/PlexEmail-master/scripts/config.conf”, line 6
plex_data_folder = ‘/Users/Kenneth/Library/Application Support/’
^
SyntaxError: invalid syntax

Your help in pointing out what I am doing wrong here is much appreciated!

I can take a quick look at your config file if you want to see what the problem might be. If you want to do that, remove any personal info (plex account info/email) and PM it to me.

v0.8.0 Released

New Feature

  • Adds support for music by handling new artists and new albums

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

@Kenneth Spronk said:
plex_data_folder = ‘/Users/Kenneth/Library/Application Support/’
^
SyntaxError: invalid syntax

Syntax error usually indicates just that. Syntax.
Incorrect character or symbol.
Make sure the ‘example’ line above still has a # in front of it.
Also, regarding single quotes that enclose the variables, there are two directions. Make sure you’re using the correct one matching example line before it. ’ (right) not ` (left)
That caret " ^ " is likely pointing to it in your console (here in the forums font, it’s not aligned)

@JamminR: Thanks! I failed to notice the difference between the two types of quotes. It turned out that the Textedit preference “smart quotes” was not that smart after all… :wink:

@“Kenneth Spronk” - You’re welcome.
Glad to hear you got it sorted.

@eadwyn said:

v0.8.0 Released

New Feature

  • Adds support for music by handling new artists and new albums

Download here: Release Plex Email v0.9.3 · jakewaldron/PlexEmail · GitHub

If I already have this installed on OS X, what’s the best way to update to the latest version?

@phunkysai said:

@eadwyn said:

v0.8.0 Released

New Feature

  • Adds support for music by handling new artists and new albums

Download here: Release Plex Email v0.9.3 · jakewaldron/PlexEmail · GitHub

If I already have this installed on OS X, what’s the best way to update to the latest version?

If you are ok with the default values for the new features, you can just copy over the new script and it should work just fine. However, if you want to customize the new features, you will need to either redo the config file with the new one or do some sort of diff/merge of your file and the new config file.

Although to enable music, you will want to add these lines at the very least to your config file:

filter_show_artists = True
filter_show_albums = True

OK I got it updated…I’m having trouble rearranging the sections though…I’d like my Music Albums to show up right after my Movies section in the email…

I’ve tried rearranging pieces of the config file with no luck…

Strike through isn’t working. Skip to the edit.

~~Hey Folks…
After building a new HTPC I finally installed plexEmail again. I host my web page on Google drive, but am having an issue getting it to read the CSS also hosted there.
I have followed directions for hosting CSS and JS from this site
(http://helplogger.blogspot.com/2014/09/host-blogger-css-javascript-files-in-google-drive.html). Other sites are using the same principle.

My current code within index.html is:

      <link rel = "Stylesheet" Type = "text/css" href="https://googledrive.com/host/ID.goes.here">

      <!-- Custom CSS -->
      <link rel = "Stylesheet" Type = "text/css" href="https://googledrive.com/host/ID.goes.here">
  <script src='https://googledrive.com/host/ID.goes.here' type = 'text/javascript'></script>

Does anyone have any experience with this, or have an idea to get this working for me?

Thanks in advance.~~

EDIT:
Scrap all of that.
Have found a place to host my webpage. It will be located at http://websitehere.com/~tim/plex/index.html
Do I still point “web folder” to the web folder on my PC or to the website above?
Does “web domain” and “web path” need to point only to the domain?

web_domain = ‘http://websitehere.com/~tim/plex/
web_path = ‘http://websitehere.com/~tim/plex

any help is appreciated.

@phunkysai said:
OK I got it updated…I’m having trouble rearranging the sections though…I’d like my Music Albums to show up right after my Movies section in the email…

I’ve tried rearranging pieces of the config file with no luck…

The script doesn’t allow for changing the order of sections right now. I’ll look into it for the next release.

@Semperfratres said:
Strike through isn’t working. Skip to the edit.

~~Hey Folks…
After building a new HTPC I finally installed plexEmail again. I host my web page on Google drive, but am having an issue getting it to read the CSS also hosted there.
I have followed directions for hosting CSS and JS from this site
(How To Host Blogger CSS and JavaScript Files in Google Drive - Helplogger). Other sites are using the same principle.

My current code within index.html is:

      <link rel = "Stylesheet" Type = "text/css" href="https://googledrive.com/host/ID.goes.here">

      <!-- Custom CSS -->
      <link rel = "Stylesheet" Type = "text/css" href="https://googledrive.com/host/ID.goes.here">
  <script src='https://googledrive.com/host/ID.goes.here' type = 'text/javascript'></script>

Does anyone have any experience with this, or have an idea to get this working for me?

Thanks in advance.~~

EDIT:
Scrap all of that.
Have found a place to host my webpage. It will be located at http://websitehere.com/~tim/plex/index.html
Do I still point “web folder” to the web folder on my PC or to the website above?
Does “web domain” and “web path” need to point only to the domain?

web_domain = ‘http://websitehere.com/~tim/plex/
web_path = ‘http://websitehere.com/~tim/plex

any help is appreciated.

web_domain = ‘http://websitehere.com
web_path = ‘~tim/plex’

web_folder should be set to where you want index.html and the images to be written. I assume you have some way to sync files in this folder to your hosted server.

I’m getting the error “sqlite3.DatabaseError: file is encrypted or is not a database” in Centos 6.7. I can get the script to work by using this command as a workaround before running the script: export LPATH_BAK=$LD_LIBRARY_PATH ; export PATH_BAK=$PATH && export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib && export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH && python2.7 ./plexEmail.py
I have read through these 30 pages and reinstalled everything as per the tutorial, but the error persists. My info: Python 2.7.9 import sqlite3 Python 2.7.9 (default, Mar 3 2016, 14:53:24) import sqlite3 sqlite3.version '2.6.0' sqlite3.sqlite_version '3.6.20'

Any help is truly appreciated, thanks

Alfke

When I updated (basically just copying over the files and overwriting), I noticed that my automated email did not go out last Friday (I had originally set up a CRON job long ago to do so).

An update doesn’t overwrite the CRON job does it? (Sorry I’m pretty newbish with all this stuff. I follow directions well, but don’t much about the underlying systems with plexemail and whatnot).

@freebeer said:
I’m getting the error “sqlite3.DatabaseError: file is encrypted or is not a database” in Centos 6.7. I can get the script to work by using this command as a workaround before running the script: export LPATH_BAK=$LD_LIBRARY_PATH ; export PATH_BAK=$PATH && export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib && export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH && python2.7 ./plexEmail.py
I have read through these 30 pages and reinstalled everything as per the tutorial, but the error persists. My info: Python 2.7.9 import sqlite3 Python 2.7.9 (default, Mar 3 2016, 14:53:24) import sqlite3 sqlite3.version '2.6.0' sqlite3.sqlite_version '3.6.20'

Any help is truly appreciated, thanks

Alfke

So when you run the following:

export LPATH_BAK=$LD_LIBRARY_PATH ; export PATH_BAK=$PATH && \ export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib && \ export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH && \ python2.7 ./plexEmail.py ; \ export PATH=$PATH_BAK ; export LD_LIBRARY_PATH=$LPATH_BAK

It works for you? Or you are seeing the error you posted?

@phunkysai said:
When I updated (basically just copying over the files and overwriting), I noticed that my automated email did not go out last Friday (I had originally set up a CRON job long ago to do so).

An update doesn’t overwrite the CRON job does it? (Sorry I’m pretty newbish with all this stuff. I follow directions well, but don’t much about the underlying systems with plexemail and whatnot).

Did you copy over the config file as well? If you did, you will need to re-configure the file. If you did not, could you try running:

python plexEmail.py -t

Yeah, I ran that test line via the command line after I updated and the test email DID get sent when I ran that command, which is why it surprised me that the cron job didn’t work on Friday.

To tell you how I updated: I downloaded the zip file, unzipped, and while it was still in my Download folder I pulled up the new config file and the old config file side-by-side and re-entered my custom config settings in the new config file. Once I had done that, I copied ALL of the files over to the installation folder and overwrote everything. Then I ran the test command (same one you gave above), and the test email went out successfully…

I think it might be a permissions issue with the new plexemail.py file I copied over, but I’m not sure how to fix it…

@phunkysai said:
I think it might be a permissions issue with the new plexemail.py file I copied over, but I’m not sure how to fix it…

What OS are you running? What does the cron job looks like? Did the cron job work before updating the script? Depending on the setup the cron job should try to email you any errors.

@eadwyn said:

So when you run the following:

export LPATH_BAK=$LD_LIBRARY_PATH ; export PATH_BAK=$PATH && \ export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib && \ export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH && \ python2.7 ./plexEmail.py ; \ export PATH=$PATH_BAK ; export LD_LIBRARY_PATH=$LPATH_BAK

It works for you? Or you are seeing the error you posted?

Yes, it works for me when I run the above. No errors.

@freebeer said:

Yes, it works for me when I run the above. No errors.

I’m not quite sure what the issue is then. On centos, you need to run that whole command every time.

@eadwyn said:

What OS are you running? What does the cron job looks like? Did the cron job work before updating the script? Depending on the setup the cron job should try to email you any errors.

Yeah it was running fine before I updated. I’m running it on an OS X box (Snow Leopard still I believe). I found the original article I used to create the launchd job, and found the CHMOD command I needed to run on the file, so I’ll see if that fixes it this Friday…