I am running ubuntu and have updated to python 2.7.9 but am running into the following error:
File “plexEmail.py”, line 1, in
import sqlite3
File “/usr/local/lib/python2.7/sqlite3/init.py”, line 24, in
from dbapi2 import *
File “/usr/local/lib/python2.7/sqlite3/dbapi2.py”, line 28, in
from _sqlite3 import *
ImportError: /usr/local/lib/python2.7/lib-dynload/_sqlite3.so: undefined symbol: PyUnicodeUCS2_AsUTF8String
@F14 said:
Earlier: msgImage = MIMEImage(fp.read())
Now: msgImage = MIMEImage(fp.read(),_subtype=“png”)It may help others with same error
Please submit this to the Github tracking list. I’m not sure it’s the exact fix the dev author may use, but it’s indeed a potential for review. He’s been busy lately (as I did just recently get a comment in reply to a request I placed.), but he is still active.
Getting this error every time I try to run:
Traceback (most recent call last):
File “PlexEmail.py”, line 9, in
import requests
ImportError: No module named requests
@halorrr said:
Getting this error every time I try to run:Traceback (most recent call last):
File “PlexEmail.py”, line 9, in
import requests
ImportError: No module named requests
Looks like you either skipped or something messed up with step 3 of the prereqs.
Prerequisites
Python 2.7 - Windows: 32 bit - https://www.python.org/ftp/python/2.7.9/python-2.7.9.msi
Windows - 32 bit DLL for SQLite version 3.8.8.3 - http://www.sqlite.org/2015/sqlite-dll-win32-x86-3080803.zip (Put this into the DLLs folder of the Python installation)
3. 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
@JamminR said:
Ok. Just registered it. I did place it under Issue - dunnow if that corresponds to “tracking list”…if not let me know
@F14 said:
Ok. Just registered it. I did place it under Issue - dunnow if that corresponds to “tracking list”…if not let me know
Yeah, that’s what I meant.
@foebik said:
Looks like you either skipped or something messed up with step 3 of the prereqs.
I actually had the plugin working for awhile, before I started getting this error. I double checked the installation of all the perquisites though since you suggested it. Everything is good there. Still the same error though. The only thing that has changed is I upgraded the mac to El Capitan, (though I’m not sure if it stopped working before or after that).
@halorrr said:
I actually had the plugin working for awhile, before I started getting this error. I double checked the installation of all the perquisites though since you suggested it. Everything is good there. Still the same error though. The only thing that has changed is I upgraded the mac to El Capitan, (though I’m not sure if it stopped working before or after that).
Try a fresh install to another folder and see if that works (dont delete the current folder).
Can someone post intructions on how to install in a freenas jail?
Seems when I have much new content added, the email that gets sent has one or two missing/broken images. I currently use cloudinary for hosting and multiple emails method.
“much new content” in this last weeks update included 27 images. Of all the images, 2 were missing/broken in the movies section, and I don’t see them on Cloudinary.
I just checked, and found that 2 of my last missing images were content I’d updated with a better quality file or moved path today. However, Plex is refreshed after I do that, the media is re-analyzed too, Plex loads the image fine. Seems PlexEmail is grabbing old data somehow maybe?
Additionally - FEATURE REQUEST
Is there a way to have PlexEmail tag or name the files sent to cloudinary with the media name??
The hex code system Cloudinary uses makes it difficult to find anything. I must search through tons of images visually, and honestly, my vision isn’t that good.
I have enabled email_to_send_to_shared_users
Any way to make a filter of users not to send mail to? I have a few dummy account users (kids who’ve been created as plex users without a valid email address) and I am getting a couple of delivery failures on each send.
Also - my niece and nepew don’t need to know about the horror movies available to everyone but them on Plex
(i realize that I could make different conf files for this, but then I couldn’t use email_to_send_to_shared_users anyway)
hi,
i have a strange problem. i have plexemail running in a docker on my unraid NAS, but it’s causing my plex library DB to get corrupted.
does anyone has an idea what could cause this ?
Matt
@cbjerg - Not as is - You’d have to make a request at author’s github tracker page.
@make77 - I’m a general PC geek so take my ideas with a grain of salt. Sometimes that salt might help flavor the real reason. First, are you 100% sure it’s PlexEmail (ie, if you stop the PlexEmail task/cronjob, Plex stops breaking?)
Second - Does PlexEmail have ‘write’ permissions to your Plex folders? Tried limiting to ‘read only’?
And then the next wholly wild speculation - perhaps PlexEmail is ‘locking’ your database files while trying to read the information from it, and then, while Plex also tries to access it, breaks something.
There’s mention of PlexEmail’s methodology, and a request it be changed from ‘directly’, here
The author or someone much more versed in the world of Python would need to give more idea.
@JamminR - yes i’m unfortunately sure its PlexEmail. as soon as i stopped the docker with PlexEmail the Plex DB did not broke again.
i will check the permission to the flex folder. i’m just wondering that it seems that i’m the only one with that problem
:-/
@JamminR - seems that plexEmail needs R/W access. with read only its not working 
@make77 - Odd. I don’t know python or sqlite well enough to know why an app that should only ‘gather’ information would need ‘write’ access to the data, however, I can understand now why it might break.
(SOMETHING is writing / breaking something, sounds like)
Sorry I can’t be of more assistance. I’ve not seen your issue personally, but I’m using a Windows (not really a) server.
@TNightster said:
After some troubles, got my script working last night and thought I would post the solution in case it might help someone else.This was the error I was getting:
C:\Python27\Scripts>python “C:\PlexEmail-0.6.0\scripts\plexEmail.py”
Traceback (most recent call last):
File “C:\PlexEmail-0.6.0\scripts\plexEmail.py”, line 656, in
cur.execute('SELECT machine_identifier FROM remote_servers WHERE url LIKE “h
ttp://127.0.0.1%”
sqlite3.DatabaseError: file is encrypted or is not a database
After some quick research, I found this article:
python - sqlite3.DatabaseError: file is encrypted or is not a database - Stack Overflow
Version mismatch between sqlite CLI and python sqlite API
I didn’t think that was exactly my issue, but figured I would give it a try.
Here was my solution:
- I renamed the copy of sqlite3.dll in the Python\DLL’s folder as sqlite3.dll.OLD
- I copied the file sqlite3.dll from “C:\Program Files (x86)\Plex\Plex Media Server” and copied it over to “C:\Python27\DLLs”
Success!
C:\PlexEmail-0.6.0\scripts>plexemail.py
Web page was not created because the option is disabled in the config file.
Successfully sent 1 email(s)Happy Plexing!
I’m also getting the same error on my Windows10 Machine. I tried the suggestion above as well as:
I have write access to the Database folder
com.plexapp.dnla.db is inside the databases folder
sqlite3.version
2.6.0
sqlite3.sqlite_version
3.6.21
Tried 64 bit and 32 bit sqlite3 (Apparently my Python is 64 bit)
And now I am stuck on this error after changing the .dll to the 64 bit

Any suggestions would be appreciated!
@Eyelinerdevil - I’m only throwing wild guesses.
With my limited experience, I’d try and ensure that Python version is less than 3 (ie, 2.7.9 as listed in prereq readme).
I’d recommend only using 32bit version due to Plex modules being 32bit modules (if your copying Plex’s). (32bit also listed in pre-reqs)
Then, ensure you have replaced the proper SQLite3 version following the instructions that Tnightster provided.
Your listed sqllite3 version numbers do not match the prerequisites as listed HERE -> https://github.com/jakewaldron/PlexEmail/blob/master/README.md#prerequisites
@JamminR said:
@Eyelinerdevil - I’m only throwing wild guesses.
With my limited experience, I’d try and ensure that Python version is less than 3 (ie, 2.7.9 as listed in prereq readme).
I’d recommend only using 32bit version due to Plex modules being 32bit modules (if your copying Plex’s). (32bit also listed in pre-reqs)
Then, ensure you have replaced the proper SQLite3 version following the instructions that Tnightster provided.
Your listed sqllite3 version numbers do not match the prerequisites as listed HERE → PlexEmail/README.md at master · jakewaldron/PlexEmail · GitHub
Thank you.I checked everything but still encountered problems…
Verified my Python is 2.7.10
Put the updated SQLite3 version in the DLL folder
This ended up breaking my PlexPy monitoring. If I go back to the older version of SQLite3, PlexPy works…
With the updated SQLite3 I am now getting this error

Any Idea?
@Eyelinerdevil said:
Any Idea?
32 or 64 bit?