Tautulli - Monitor your Plex Media Server

Hi,

Synology docker log shows:

2021-02-15 15:09:48	stdout	2021-02-15 10:09:48 - INFO :: MainThread : [Docker] Linux 3.10.105 (#25426 SMP Mon Dec 14 18:47:29 CST 2020 - Debian GNU/Linux 10 buster)
2021-02-15 15:09:48	stdout	2021-02-15 10:09:48 - INFO :: MainThread : Starting Tautulli v2.6.6
2021-02-15 15:09:48	stdout	  '(?P<delim>>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?:$|\n)',  # ,".*?"
2021-02-15 15:09:48	stdout	/app/lib/backports/csv.py:750: DeprecationWarning: invalid escape sequence \w
2021-02-15 15:09:48	stdout	  '(?:^|\n)(?P<quote>["\']).*?(?P=quote)(?P<delim>[^\w\n"\'])(?P<space> ?)',   #  ".*?",
2021-02-15 15:09:48	stdout	/app/lib/backports/csv.py:749: DeprecationWarning: invalid escape sequence \w
2021-02-15 15:09:48	stdout	  for restr in ('(?P<delim>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?P=delim)', # ,".*?",
2021-02-15 15:09:48	stdout	/app/lib/backports/csv.py:748: DeprecationWarning: invalid escape sequence \w
2021-02-15 15:09:47	stdout	  """Fetch a request token.
2021-02-15 15:09:47	stdout	/app/lib/requests_oauthlib/oauth1_session.py:242: DeprecationWarning: invalid escape sequence \*
2021-02-15 15:09:47	stdout	  """ URL : [http://]?[\w\.?/]+"""
2021-02-15 15:09:47	stdout	/app/lib/twitter/parse_tweet.py:99: DeprecationWarning: invalid escape sequence \w
2021-02-15 15:09:47	stdout	  version_regex = re.compile("^\d\.\d{1,2}$")
2021-02-15 15:09:47	stdout	/app/lib/facebook/__init__.py:93: DeprecationWarning: invalid escape sequence \d
2021-02-15 15:09:47	stdout	  GNTP_HEADER = re.compile('([\w-]+):(.+)')
2021-02-15 15:09:47	stdout	/app/lib/gntp/core.py:33: DeprecationWarning: invalid escape sequence \w
2021-02-15 15:09:47	stdout	  'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)',
2021-02-15 15:09:47	stdout	/app/lib/gntp/core.py:29: DeprecationWarning: invalid escape sequence \d
2021-02-15 15:09:47	stdout	  'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)' +
2021-02-15 15:09:47	stdout	/app/lib/gntp/core.py:22: DeprecationWarning: invalid escape sequence \d
2021-02-15 15:09:45	stdout	  for prop, value in re.findall('([-\w]+)\s*:\s*([^:;]*)', style):
2021-02-15 15:09:45	stdout	/app/lib/bleach/sanitizer.py:126: DeprecationWarning: invalid escape sequence \w
2021-02-15 15:09:45	stdout	  if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style):
2021-02-15 15:09:45	stdout	/app/lib/bleach/sanitizer.py:122: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  """\s*|"[\s\w]+"|\([\d,%\.\s]+\))*$""")
2021-02-15 15:09:45	stdout	/app/lib/bleach/sanitizer.py:117: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  gauntlet = re.compile("""^([-/:,#%.'"\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'"""
2021-02-15 15:09:45	stdout	/app/lib/bleach/sanitizer.py:116: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style)
2021-02-15 15:09:45	stdout	/app/lib/bleach/sanitizer.py:110: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
2021-02-15 15:09:45	stdout	/app/lib/bleach/sanitizer.py:55: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  not re.match("^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword):
2021-02-15 15:09:45	stdout	/app/lib/html5lib/sanitizer.py:249: DeprecationWarning: invalid escape sequence \(
2021-02-15 15:09:45	stdout	  for prop, value in re.findall("([-\w]+)\s*:\s*([^:;]*)", style):
2021-02-15 15:09:45	stdout	/app/lib/html5lib/sanitizer.py:240: DeprecationWarning: invalid escape sequence \w
2021-02-15 15:09:45	stdout	  if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style):
2021-02-15 15:09:45	stdout	/app/lib/html5lib/sanitizer.py:236: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  if not re.match("""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style):
2021-02-15 15:09:45	stdout	/app/lib/html5lib/sanitizer.py:234: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style)
2021-02-15 15:09:45	stdout	/app/lib/html5lib/sanitizer.py:231: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  'xlink:href' in attrs and re.search('^\s*[^#\s].*',
2021-02-15 15:09:45	stdout	/app/lib/html5lib/sanitizer.py:202: DeprecationWarning: invalid escape sequence \s
2021-02-15 15:09:45	stdout	  val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
2021-02-15 15:09:45	stdout	/app/lib/html5lib/sanitizer.py:188: DeprecationWarning: invalid escape sequence \s

FYI, does NOT seem to break anything. Just reporting on it.

Thanks,

Will

Has this been resolved by Microsoft yet? I use MS Defender, so I have been holding off upgrading Tautulli because of this issue.

It was resolved a week ago.

1 Like

Howdy!
I excitedly tried installing Tautulli on my Raspberry Pi 4, but it doesn’t seem to be working? I can’t find the command to start it, and it’s not running if I check with ps -ef.

Pointing a browser to http://pi4:8181 gives me nothing. It just says it fails to connect.

This is what I have tried so far:

pi@pi4 $ sudo apt install snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
snapd is already the newest version (2.37.4-1+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

pi@pi4 ~ $ sudo snap install tautulli
snap "tautulli" is already installed, see 'snap help refresh'

pi@pi4 ~/.config $ whereis tautulli
tautulli:
pi@pi4 ~/.config $ which tautulli
pi@pi4 ~/.config $ sudo service tautulli start
Failed to start tautulli.service: Unit tautulli.service not found.
pi@pi4 ~ $ netstat -a | grep 8181
pi@pi4 ~ $

Sorry if this is a too simple a question, but I have tried finding information in this forum and elsewhere, but failed to figure out what is wrong.

FeatHub link does not work. Tried to open the link and the page does not exist anymore. Don’t know if it’s already been requested or not, but a trend line would be nice to have in the graphs if that is possible. Love the monitoring that Tautulli offers! Thanks for building this!

I’ve just updated Tautulli from 2.2.1 to the latest 2.6.8, since this also required an update from Python 2 to Python 3 I’m going through a bunch of old scripts I’ve written updating them for Python 3.

But I’m unable to get this line to work:

recently_aired_episodes = library.search(sort=‘originallyAvailableAt:desc’, maxresults=200, libtype=‘episode’, collection=[collection_name])

The above triggers the following error:

plexapi.exceptions.BadRequest: Unknown filter category: collection

File “/Applications/Tautulli/lib/plexapi/library.py”, line 718, in _cleanSearchFilter
raise BadRequest(‘Unknown filter category: %s’ % category)

The method triggering the exception validates the filter against a list of “supported categories”, but when I print the list of supported categories this is what I get:

categories: [‘show.title’, ‘show.studio’, ‘show.userRating’, ‘show.contentRating’, ‘show.year’, ‘show.viewCount’, ‘show.lastViewedAt’, ‘show.genre’, ‘show.collection’, ‘show.director’, ‘show.writer’, ‘show.producer’, ‘show.actor’, ‘show.addedAt’, ‘show.unmatched’, ‘show.unwatchedLeaves’, ‘show.label’, ‘episode.title’, ‘episode.addedAt’, ‘episode.originallyAvailableAt’, ‘episode.year’, ‘episode.userRating’, ‘episode.viewCount’, ‘episode.lastViewedAt’, ‘episode.unwatched’, ‘episode.inProgress’, ‘episode.duplicate’, ‘episode.hdr’, ‘episode.resolution’, ‘episode.mediaSize’, ‘episode.mediaBitrate’, ‘episode.subtitleLanguage’, ‘episode.audioLanguage’, ‘episode.trash’]

Instead of collection it’s using show.collection 
 When I check the method documentation it states that collection is what should be used and I’m alsop unable to use show.collection when making the python call. Am I doing something wrong, or how am I supposed to filter on a collection?

I’m unsure if this is a bug or if I’m using it wrong, anyone with insight?

You’ll want to add the collection or show.collection as a kwargs. So **{'show.collection':'my collection'}. Not really a Tautulli issue but a plexapi issue, which if you check their repo you’ll find the same issue and similar suggestion. I currently have a PR to address this as I’m the one who made the change to pull the categories automatically based on the library you’re working in.

recently_aired_episodes = library.search(sort=‘originallyAvailableAt:desc’, maxresults=200, libtype=‘episode’, **{'show.collection':'my collection'}

Link to PR, inside the PR I’ve linked to the issues related.

I keep getting “The PyCryptodome library is missing” in the Notification settings.
I followed wiki manual and already installed PyCryptodome on my Ubuntu 20.04 LTS system.
Rebooted machine a few times. Still issue unsolved.

Thanks! Using **{'show.collection':'my collection'} made the error go away, so that part works. But I’m unable to get any matches when filtering on a collection, is anyone able to confirm that the below should work?

shows = library.search(sort=‘originallyAvailableAt:desc’, maxresults=200, libtype=‘show’, **{‘show.collection’:‘Test’})
episodes = library.search(sort=‘originallyAvailableAt:desc’, maxresults=200, libtype=‘episode’, **{‘show.collection’:‘Test’})

I’ve created a temporary collection named “Test” and tagged a TV show with it. If I remove the kwargs filter the above will return all shows/episodes in the library as expected, and if iterate the result I can see that the tagged show contains a collection named “Test”, also as expected. But when I include the filter on a collection named “Test” the result is empty.

Edit:
I updated to Plex 1.22.0.4163, I was still on 1.21.x.x, and now the filterFields() method that provided the list of supported categories just return an empty array. So after the update even **{'show.collection':'my collection'} return

plexapi.exceptions.BadRequest: Unknown filter category: show.collection

Hi, I’ve been trying to update my Openmediavault system to phyton 3 with the Tautulli running for some time. Unfortunately, tautulli always shows me the default version 2.7. How can I change this?

I had to update the init script located at:

Tautulli/init-scripts/

For me running on macOS I updated init.osx to the Python 3 location instead of Python 2.7 that was the one that was used.

Use Linux Debian. How are you there?

Hi,
I recently installed Tautulli and I have an issue with the newsletter that I simply can’t figure out. I assume it is user error. I set up the newsletter to generate an .html file and I also set a unique ID (n_1). I also set a password to access /newsletter. I see the html files being generated but I simply can’t figure out how to browse to them or link to them using a URL. I try my domain:8181/newsletter and I got prompted for the password but it is empty. I tried: my domain:8181/newsletter/id/n_1/ also blank. I tried id=1 and all kinds of other combinations but I can’t find a way to display this newsletter. Did I misunderstand and I actually need to run my own web server and place the newsletter there or is there a way to display it via Tautulli and if so how ? at the newsletter agent configuration is says my id:1 in case this is needed.
thanks
c

Since updating to the latest PMS andTautulli I’ve been having issues with recently added notifications:

2021-04-19 23:24:32 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent’ (110490) done processing metadata.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘Mare of Easttown S01 E01’ (110502, grandparent 110500) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘Season 1’ (110501 , parent 110500) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘Mare of Easttown’ (110500) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E08’ (110499, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E07’ (110498, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E06’ (110497, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E05’ (110496, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E04’ (110495, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E03’ (110494, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E02’ (110493, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent S01 E01’ (110492, grandparent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘Season 1’ (110491 , parent 110490) added to recently added queue.
2021-04-19 23:23:45 DEBUG Tautulli TimelineHandler :: Library item ‘The Serpent’ (110490) added to recently added queue.

Ten minutes later (I’ve set the delay):

2021-04-19 23:33:46 1 telegram on_created Plex [ TV ] - S00E01 - The Serpent
2021-04-19 23:33:46 1 telegram on_created Plex [ TV ] - S00E01 - Mare of Easttown

I guess this problem has to do with the new way plex handle recently added and the home screen?

Running Tautulli 2.6.3 on a NetGear ReadyNAS. I have installed and tested Python3, but changing the systemd service script to launch Tautulli with Pyhton3 fails with these errors. I am not proficient in Python so I am hoping to get some insight.

(I followed the Linux alternative upgrade, modifying existing installation, here Upgrading to Python 3 (Tautulli v2.5) · Tautulli/Tautulli Wiki · GitHub )

Traceback (most recent call last):
File “/apps/tautulli/Tautulli.py”, line 38, in
import plexpy
File “/apps/tautulli/plexpy/init.py”, line 63, in
from plexpy import activity_handler
File “/apps/tautulli/plexpy/activity_handler.py”, line 36, in
from plexpy import activity_processor
File “/apps/tautulli/plexpy/activity_processor.py”, line 32, in
from plexpy import database
File “/apps/tautulli/plexpy/database.py”, line 31, in
from plexpy import helpers
File “/apps/tautulli/plexpy/helpers.py”, line 63, in
from plexpy import logger
File “/apps/tautulli/plexpy/logger.py”, line 40, in
from plexpy import helpers
ImportError: cannot import name ‘helpers’

You will need to contact the creator of the NAS installer packages. I have no idea how those packages work or how python is bundled inside them. It’s very likely they are done differently and the wiki instructions won’t work.

If your NAS supports Docker, then we can assist with that.

I noticed the Git repository lists python>=3.6, whereas the ReadyNAS is built on Debian Jessie, which only includes packages for Python 3.4. Is is sane to expect an out-dated Python3 to be an issue?

Here is a copy of my systemd script in a python3 environment, though it is Python version 3.6, not Python 3.4

Good luck!


#
# INSTALLATION NOTES
#
#   1. Copy this file into your systemd service unit directory (often '/lib/systemd/system')
#      and name it 'tautulli.service' with the following command:
#       cp /opt/Tautulli/init-scripts/init.systemd /lib/systemd/system/tautulli.service
#
#   2. Edit the new tautulli.service file with configuration settings as required.
#      More details in the "CONFIGURATION NOTES" section shown below.
#
#   3. Enable boot-time autostart with the following commands:
#       systemctl daemon-reload
#       systemctl enable tautulli.service
#
#   4. Start now with the following command:
#       systemctl start tautulli.service
#
# CONFIGURATION NOTES
#
#    - The example settings in this file assume that you will run Tautulli as user: tautulli
#    - The example settings in this file assume that Tautulli is installed to: /opt/Tautulli
#
#    - To create this user and give it ownership of the Tautulli directory:
#       1. Create the user:
#           Ubuntu/Debian: sudo addgroup tautulli && sudo adduser --system --no-create-home tautulli --ingroup tautulli
#           CentOS/Fedora: sudo adduser --system --no-create-home tautulli
#       2. Give the user ownership of the Tautulli directory:
#           sudo chown -R tautulli:tautulli /opt/Tautulli
#
#    - Adjust ExecStart= to point to:
#       1. Your Python interpreter (get the path with "command -v python3")
#          - Default: /usr/bin/python3
#       2. Your Tautulli executable
#          - Default: /opt/Tautulli/Tautulli.py
#       3. Your config file (recommended is to put it somewhere in /etc)
#          - Default: --config /opt/Tautulli/config.ini
#       4. Your datadir (recommended is to NOT put it in your Tautulli exec dir)
#          - Default: --datadir /opt/Tautulli
#
#    - Adjust User= and Group= to the user/group you want Tautulli to run as.
#
#    - WantedBy= specifies which target (i.e. runlevel) to start Tautulli for.
#       multi-user.target equates to runlevel 3 (multi-user text mode)
#       graphical.target  equates to runlevel 5 (multi-user X11 graphical mode)

[Unit]
Description=Tautulli - Stats for Plex Media Server usage
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/python3 /opt/Tautulli/Tautulli.py --config /etc/tautulli/config.ini --datadir /opt/data/Tautulli --quiet --nolaunch
User=tautulli
Group=tautulli
Restart=on-abnormal
RestartSec=5
StartLimitInterval=90
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

Hello all,

Can Tautulli run on a device separate from the Plex install? For example I am running Plex on my Synology NAS. I would like to fire up a Tautulli vm and connect it to the Plex install on my NAS. Is this a supported config?

Thanks,
Steve

Any ideas how to fix it in logs? Or it is not supported by code? Cannot find answer on FAQ or forums.
P.S. Installed 2.7.3 does not log video too in Plex media library = “Photo”
Thank you in advance