Tautulli / Tautulli-Issues

Bug reports for Tautulli
18 stars 3 forks source link

Newsletter Agent Error #273

Closed zbinkster closed 4 years ago

zbinkster commented 4 years ago

Describe the Bug Newsletter is not working. Either when manually running the Test recently added newsletter or when running automated.

Steps to Reproduce

  1. Go to Newletter Agents
  2. Click on 'test recently added newsletter'
  3. Go to 'Logs'
  4. See error Tautulli NotificationHandler :: Notification thread exception: python refuses to compile code with both a UTF8 byte-order-mark and a magic encoding comment Traceback (most recent call last): File "/mnt/mpathd/zbinkster/Tautulli/plexpy/notification_handler.py", line 77, in process_queue notify_newsletter(params) File "/mnt/mpathd/zbinkster/Tautulli/plexpy/newsletter_handler.py", line 136, in notify success = newsletter_agent.send() File "/mnt/mpathd/zbinkster/Tautulli/plexpy/newsletters.py", line 509, in send self.newsletter = self.generate_newsletter() File "/mnt/mpathd/zbinkster/Tautulli/plexpy/newsletters.py", line 482, in generate_newsletter preview=self.is_preview File "/mnt/mpathd/zbinkster/Tautulli/plexpy/newsletters.py", line 337, in serve_template return exceptions.html_error_template().render(), True File "/home/zbinkster/Tautulli/lib/mako/template.py", line 476, in render return runtime.render(self, self.callable, args, data) File "/home/zbinkster/Tautulli/lib/mako/runtime.py", line 883, in _render _kwargs_forcallable(callable, data) File "/home/zbinkster/Tautulli/lib/mako/runtime.py", line 920, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/home/zbinkster/Tautulli/lib/mako/runtime.py", line 947, in _exectemplate callable(context, *args, **kwargs) File "memory:0x7ff4085ccd10", line 45, in render_body File "/home/zbinkster/Tautulli/lib/mako/exceptions.py", line 93, in init self.records = self._init(traceback) File "/home/zbinkster/Tautulli/lib/mako/exceptions.py", line 176, in _init encoding = util.parse_encoding(fp) File "/home/zbinkster/Tautulli/lib/mako/util.py", line 278, in parse_encoding "python refuses to compile code with both a UTF8" SyntaxError: python refuses to compile code with both a UTF8 byte-order-mark and a magic encoding comment

Expected Behavior I would expect the job to run and sent an automated email with the latest movie releases.

Screenshots Provide screenshots to help explain your problem.

Relevant Settings

Tautulli and System Info (see Tautulli settings page)

Link to logs (required) https://gist.github.com/zbinkster/0b8fa4c60c9c15ddd08fc87accaf5d58

JonnyWong16 commented 4 years ago

Upgrade to Python 3.

zbinkster commented 4 years ago

Unfortunately I do not have the option of doing that. This is a seedbox. Also the documentation does state Python 2 and 3 are supported. Is that not the case?

JonnyWong16 commented 4 years ago

Most things should be working with Python 2. There will be edge cases that I have not tested with Python 2 and those are not likely to get fixed as Tautulli slowly drops support for Python 2.

samwiseg0 commented 4 years ago

Are you sure py3 is not installed on the seedbox? Did you ask your provider?

zbinkster commented 4 years ago

I just opened a ticket with them. If it is in fact installed is there something im supposed to do in the application so that it will use 3 instead of 2?

samwiseg0 commented 4 years ago

You just need to specify the py3 interpreter when starting Tautulli.

https://github.com/Tautulli/Tautulli-Wiki/wiki/Upgrading-to-Python-3-%28Tautulli-v2.5%29

zbinkster commented 4 years ago

Much appreciated on the help.