zSeriesGuy / Tautulli

A Python based monitoring and tracking tool for Plex Media Server.
http://tautulli.com
GNU General Public License v3.0
27 stars 9 forks source link

Notifications doesn't work #14

Closed ebadenes closed 4 years ago

ebadenes commented 5 years ago

Version: 3.0.00 Branch: 3.0.00 Commit hash:

Operating system: Ubuntu Python version:

What you did? Error in notifications What happened?

Tautulli NotificationHandler :: Notification thread exception: 'NoneType' object has no attribute 'getitem'Traceback (most recent call last):     File "/app/tautulli/plexpy/notification_handler.py", line 60, in process_queue         add_notifier_each(params)     File "/app/tautulli/plexpy/notification_handler.py", line 104, in add_notifier_each         kwargs)     File "/app/tautulli/plexpy/notification_handler.py", line 457, in build_media_notify_params         server = plexpy.PMS_SERVERS.get_server_by_id(session['server_id']) TypeError: 'NoneType' object has no attribute 'getitem'

What you expected?

How can we reproduce your issue?

What are your (relevant) settings?

Link to logs:

zSeriesGuy commented 5 years ago

@ebadenes I need a little more information to figure out how you got to this error. Did you recently implement this fork of Tautulli? Did you migrate an existing tautulli database installation? Or is this a new, fresh installation? What kind of notification agent is it? I have actually only tested with email agent.

I'll see what I can figure out. Thank you for reporting this.

ebadenes commented 5 years ago

Hi, I implemented this fork some month ago, it's a fresh installation. I'm using dockerized image. This error occurs in 'new recently added item' with Telegram Agent.

i don't know how to force, if you tell me, i can test it

zSeriesGuy commented 4 years ago

@ebadenes This issue is resolved in the V4.0.00 branch. Note that V4.0.00 is a python3 implementation and is still being tested.

If you would like to resolve this issue while still on the V3.0.00 branch, you can manually make the changes. In plexpy/notification_handler.py, move line 457 into the if session block on line 464 and copy it to the elif block at 466 with a change from session to timeline. Like so: ` if session: rating_key = session['rating_key'] server = plexpy.PMS_SERVERS.get_server_by_id(session['server_id']) elif timeline: rating_key = timeline['rating_key'] server = plexpy.PMS_SERVERS.get_server_by_id(timeline['server_id'])

`