@jkingaround wrote:
Hi! I know this might not be enough information so let me know what else you need but here is the situation. I have a config that pulls movies from IMDb then checks RSS against that list, downloads the movie, renames it, and then is supposed to send an email with the movie info.
Everything works except the actual email sending (it used to work but not sure what happened). In the same config I have TV tasks that send emails perfectly fine so it seems to be an issue specific to the watchlist_dl task and the template it's using (which is the default HTML template included afaik).
The error is as follows:
2019-06-18 20:47 ERROR notify watchlist_dl Error rendering notification body: (UndefinedError) 'unicode object' has no attribute 'accepted' 2019-06-18 20:47 ERROR notify_entry watchlist_dl 'FlexGetTemplate' object has no attribute 'encode' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flexget/components/notify/notify.py", line 104, in end_notification send_notification(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flexget/components/notify/notification_framework.py", line 125, in send_notification title, message, rendered_config File "/usr/local/lib/python2.7/dist-packages/flexget/components/notify/notifiers/email.py", line 181, in notify email.attach(MIMEText(message.encode('utf-8'), content_type, _charset='utf-8')) AttributeError: 'FlexGetTemplate' object has no attribute 'encode'
The config is as follows:
watchlist_dl: priority: 10 inputs: - rss: '{? pixel.rss2 ?}' verify_ssl_certificates: no manipulate: - title: replace: regexp: '(^[^\/]*)/([^\/]*)/([^\/]*)/([^\/]*)/([^\/]*)' format: '\1\5' - title: replace: regexp: '\s+' format: ' ' - title: replace: regexp: ':' format: '' quality: 1080p list_match: from: - movie_list: movies_from_watchlist imdb_lookup: yes seen_movies: loose no_entries_ok: yes content_size: max: 5000 strict: no deluge: host: '{? deluge.host ?}' port: 2134 username: '{? deluge.user ?}' password: '{? deluge.password ?}' label: watchlist move_completed_path: ~/torrents/completed/_Movies/_renamed content_filename: "{% if imdb_name is defined %}{{imdb_name|replace(':','')}} ({{imdb_year}}) {{quality.resolution}}{% else %}{{title}}{% if quality != unknown %} {{quality.resolution}}{% endif %}{% endif %}" notify: entries: template: html via: - email: from: '{? email.email ?}' to: '{? email.email ?}' smtp_host: smtp.gmail.com smtp_port: 587 smtp_username: '{? email.username ?}' smtp_password: '{? watchlist.password ?}' smtp_tls: yes html: yes title: "Watchlist Movie: {% if imdb_name is defined %}{{imdb_name}} ({{imdb_year}}){% else %}{{title}}{% endif %}" template: no_global`
Thanks!
Posts: 1
Participants: 1