Skip to content

thetvdb_lookup plugin not finding episode by airdate #1424

@frozenpine1

Description

@frozenpine1

Expected behaviour:

Identify episode

Actual behaviour:

2016-09-23 09:42 DEBUG    thetvdb_lookup mvtvshow        Error looking up tvdb episode information for james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks: Error processing request on tvdb: {u'invalidLanguage': u'Some translations were not available in the specified language'}

Steps to reproduce:

  • Step 1: run task

Config:

tasks:
  mvtvshow:
    seen: local
    pathscrub: windows
    series:
      - James Corden:
          set:
            tvdb_id: 292421
          identified_by: date
    filesystem:
      path: /mnt/deluge/tvshow/unrar/
      regexp: '^((?!sample).)*\.(avi|mkv|mp4|m4v|iso)$'
      recursive: yes
      retrieve: files
    content_size:
      min: 15
    no_entries_ok: yes
    parsing:
      series: internal
    require_field:
      - tvdb_series_name
      - tvdb_season
      - tvdb_ep_id
      - tvdb_ep_name
      - tvdb_ep_air_date
    metainfo_series: yes
    thetvdb_lookup: yes
    move:
      to: /mnt/plex/tvshow/{{ tvdb_series_name }}/Season {{ tvdb_season }}/
      filename: >
        {{ tvdb_series_name }} - {{ tvdb_ep_id }} - {{ tvdb_ep_name }} - AD{{ tvdb_ep_air_date.strftime("Y%YM%mD%d") }}{% if proper_count %}P{%$
      clean_source: 200```

Log:

[root@d5835c537056 config]# flexget --debug execute --dump
2016-09-23 09:42 DEBUG    manager                       Figuring out config load paths
2016-09-23 09:42 DEBUG    manager                       Found config: /config/config.yml
2016-09-23 09:42 DEBUG    manager                       Config file /config/config.yml selected
2016-09-23 09:42 DEBUG    manager                       sys.defaultencoding: ascii
2016-09-23 09:42 DEBUG    manager                       sys.getfilesystemencoding: UTF-8
2016-09-23 09:42 DEBUG    manager                       os.path.supports_unicode_filenames: False
2016-09-23 09:42 DEBUG    plugin                        Trying to load plugins from: [u'/config/plugins', '/usr/lib/python2.7/site-packages/flexget/plugins']
2016-09-23 09:42 DEBUG    safe                          Reading from cache file /tmp/safe-0.4.words.cache
2016-09-23 09:42 DEBUG    deluge                        ConfigManager started..
2016-09-23 09:42 DEBUG    plugin                        (u'Plugin `%s` requires `%s` to load.', u'memusage', u'ext lib `guppy`')
2016-09-23 09:42 DEBUG    plugin                        Plugins took 1.64 seconds to load. 258 plugins in registry.
2016-09-23 09:42 DEBUG    manager                       Connecting to: sqlite:////config/db-config.sqlite
2016-09-23 09:42 DEBUG    manager                       config_name: config
2016-09-23 09:42 DEBUG    manager                       config_base: /config
2016-09-23 09:42 DEBUG    manager                       New config data loaded.
2016-09-23 09:42 DEBUG    schema                        current flexget version already exist in db 2.3.32
2016-09-23 09:42 DEBUG    parsing                       setting default movie parser to internal. (options: {u'internal': <flexget.plugins.parsers.parser_internal.ParserInternal object at 0x2ae712144c50>, u'guessit': <flexget.plugins.parsers.parser_guessit.ParserGuessit object at 0x2ae7121117d0>})
2016-09-23 09:42 DEBUG    parsing                       setting default series parser to internal. (options: {u'internal': <flexget.plugins.parsers.parser_internal.ParserInternal object at 0x2ae712144c50>, u'guessit': <flexget.plugins.parsers.parser_guessit.ParserGuessit object at 0x2ae7121117d0>})
2016-09-23 09:42 DEBUG    cron_env                      Encoding UTF-8 stored
2016-09-23 09:42 DEBUG    util.simple_persistence                 setting key terminal_encoding value 'UTF-8'
2016-09-23 09:42 DEBUG    task_queue                    task queue shutdown requested
2016-09-23 09:42 INFO     ipc.rpyc                      server started on [127.0.0.1]:39165
2016-09-23 09:42 DEBUG    task          mvtvshow        executing mvtvshow
2016-09-23 09:42 VERBOSE  filesystem    mvtvshow        Starting to scan folders.
2016-09-23 09:42 VERBOSE  filesystem    mvtvshow        Scanning folder /mnt/deluge/tvshow/unrar/. Recursion is set to True.
2016-09-23 09:42 DEBUG    filesystem    mvtvshow        Scanning /mnt/deluge/tvshow/unrar/
2016-09-23 09:42 DEBUG    filesystem    mvtvshow        Checking if /mnt/deluge/tvshow/unrar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.rar qualifies to be added as an entry.
2016-09-23 09:42 DEBUG    filesystem    mvtvshow        Checking if /mnt/deluge/tvshow/unrar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.rar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.mkv qualifies to be added as an entry.
2016-09-23 09:42 DEBUG    backlog       mvtvshow        0 entries purged from backlog
2016-09-23 09:42 VERBOSE  details       mvtvshow        Produced 1 entries.
2016-09-23 09:42 DEBUG    parser_internal mvtvshow        Parsing series: `james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks` kwargs: {'identified_by': u'date', u'date_regexps': [], 'strict_name': False, 'name': u'James Corden', 'prefer_specials': None, 'special_ids': [], 'alternate_names': [], u'sequence_regexps': [], 'date_dayfirst': None, u'id_regexps': [], 'assume_special': None, 'name_regexps': [], 'date_yearfirst': None, 'allow_groups': [], u'ep_regexps': []}
2016-09-23 09:42 DEBUG    parser_internal mvtvshow        Parsing result: <SeriesParser(data=james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks,name=James Corden,id=2016-09-12 00:00:00,season=None,episode=None,quality=720p hdtv h264,proper=0,status=OK)> (in 6.809 ms)
2016-09-23 09:42 DEBUG    series        mvtvshow        james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks detected as <SeriesParser(data=james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks,name=James Corden,id=2016-09-12 00:00:00,season=None,episode=None,quality=720p hdtv h264,proper=0,status=OK)>, field: title
2016-09-23 09:42 DEBUG    content_size  mvtvshow        james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks size 1446 MB
2016-09-23 09:42 DEBUG    series        mvtvshow        start with episodes: [u'james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks']
2016-09-23 09:42 DEBUG    series        mvtvshow        current episodes: [u'james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks']
2016-09-23 09:42 DEBUG    series        mvtvshow        -------------------- process_propers -->
2016-09-23 09:42 DEBUG    series        mvtvshow        propers - downloaded qualities: {}
2016-09-23 09:42 DEBUG    series        mvtvshow        continuing w. episodes: [u'james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks']
2016-09-23 09:42 DEBUG    series        mvtvshow        best episode is: james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks
2016-09-23 09:42 VERBOSE  task          mvtvshow        ACCEPTED: `james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks` by series plugin because choosing best available quality
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Looking up tvdb information for James Corden 292421
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Series <name=James Corden,tvdb_id=292421> information restored from cache.
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Looking up tvdb information for James Corden 292421
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Series <name=James Corden,tvdb_id=292421> information restored from cache.
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Episode The Late Late Show with James Corden e2016-09-12 00:00:00 not found in cache, looking up from tvdb.
2016-09-23 09:42 DEBUG    util.simple_persistence mvtvshow        setting key auth_tokens value {u'default': u'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NzQ3MjkzODUsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDc0NjQyOTg1fQ.DTNzMbPRxaydMkFVNJ4-AA7wu3GegEKnLLqMofIb4qY3wzVTq7euKtPCjDgmMSN644yy14baKj_xkVvNPKRdPFgiH4O4PWvu7Na3RRrglW5QrnA24oB03Ff_cwGwipqVEfQt_KyVhYIgHQcyihRSp5Zemy2O6UtciR6f6AnSLiaW26G3Y2hrxxD7mTlro-zoqvsMLj1MCPjGhVN2030MFsEQEem00VXcOGN4LyC28nm_wcGIx2NPpXCA99XOQy5BZJlRmsjML_A-v_6jWpfmAPfIIx7lIN6o3kOSrBVq__vMAKGCJR6iJJuOBn2NDVtEDnVimXJbQYRjKiuWQbLb9A'}
2016-09-23 09:42 DEBUG    utils.requests mvtvshow        Fetching api.thetvdb.com/series/292421/episodes/query
2016-09-23 09:42 DEBUG    util.simple_persistence mvtvshow        setting key auth_tokens value {u'default': u'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NzQ3MjkzODUsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDc0NjQyOTg1fQ.DTNzMbPRxaydMkFVNJ4-AA7wu3GegEKnLLqMofIb4qY3wzVTq7euKtPCjDgmMSN644yy14baKj_xkVvNPKRdPFgiH4O4PWvu7Na3RRrglW5QrnA24oB03Ff_cwGwipqVEfQt_KyVhYIgHQcyihRSp5Zemy2O6UtciR6f6AnSLiaW26G3Y2hrxxD7mTlro-zoqvsMLj1MCPjGhVN2030MFsEQEem00VXcOGN4LyC28nm_wcGIx2NPpXCA99XOQy5BZJlRmsjML_A-v_6jWpfmAPfIIx7lIN6o3kOSrBVq__vMAKGCJR6iJJuOBn2NDVtEDnVimXJbQYRjKiuWQbLb9A'}
2016-09-23 09:42 DEBUG    utils.requests mvtvshow        Fetching https://api.thetvdb.com/episodes/5742291
2016-09-23 09:42 DEBUG    thetvdb_lookup mvtvshow        Error looking up tvdb episode information for james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks: Error processing request on tvdb: {u'invalidLanguage': u'Some translations were not available in the specified language'}
2016-09-23 09:42 DEBUG    urlrewriter   mvtvshow        Checking 1 entries
2016-09-23 09:42 VERBOSE  details       mvtvshow        Summary - Accepted: 1 (Rejected: 0 Undecided: 0 Failed: 0)
2016-09-23 09:42 DEBUG    content_size  mvtvshow        james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks size 1446 MB
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Looking up tvdb information for James Corden 292421
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Series <name=James Corden,tvdb_id=292421> information restored from cache.
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Looking up tvdb information for James Corden 292421
2016-09-23 09:42 DEBUG    api_tvdb      mvtvshow        Series <name=James Corden,tvdb_id=292421> information restored from cache.
2016-09-23 09:42 DEBUG    utils.template mvtvshow        Error during rendering: (UndefinedError) 'None' has no attribute 'strftime'
2016-09-23 09:42 WARNING  plugin        mvtvshow        Filename value replacement `{{ tvdb_series_name }} - {{ tvdb_ep_id }} - {{ tvdb_ep_name }} - AD{{ tvdb_ep_air_date.strftime("Y%YM%mD%d") }}{% if proper_count %}P{% if proper_count > 1 %}{{ proper_count }}{% endif %}{% endif %} - {{ quality }}
` failed: (UndefinedError) 'None' has no attribute 'strftime'
-- Accepted: ---------------------------
title            : james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks
url              : file:///mnt/deluge/tvshow/unrar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.rar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.mkv
original_url     : file:///mnt/deluge/tvshow/unrar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.rar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.mkv
accepted_by      : series
accessed         : 2016-09-19 21:58:42.660032
content_size     : 1446
created          : 2016-09-23 09:42:43.917863
filename         : james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.mkv
imdb_id          : tt4280606
imdb_url         : www.imdb.com/title/tt4280606
location         : /mnt/deluge/tvshow/unrar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.rar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.mkv
modified         : 2016-09-19 22:00:24.346316
proper           : False
proper_count     : 0
quality          : 720p hdtv h264
reason           : choosing best available quality
release_group    : None
series_date      : 2016-09-12 00:00:00
series_episodes  : 1
series_id        : 2016-09-12
series_id_type   : date
series_name      : James Corden
series_parser    : <SeriesParser(data=james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks,name=James Corden,id=2016-09-12 00:00:00,season=None,episode=None,quality=720p hdtv h264,proper=0,status=OK)>
series_releases  : [1]
series_season    : 2016
task             : mvtvshow
timestamp        : 2016-09-19 22:00:24.346316
tvdb_absolute_number: <LazyField - value will be determined when it is accessed>
tvdb_actors      : [James Corden]
tvdb_air_time    : 12:37 AM
tvdb_airs_day_of_week: Daily
tvdb_banner      : thetvdb.com/banners/graphical/292421-g.jpg
tvdb_content_rating:
tvdb_ep_air_date : <LazyField - value will be determined when it is accessed>
tvdb_ep_directors: <LazyField - value will be determined when it is accessed>
tvdb_ep_id       : <LazyField - value will be determined when it is accessed>
tvdb_ep_image    : <LazyField - value will be determined when it is accessed>
tvdb_ep_name     : <LazyField - value will be determined when it is accessed>
tvdb_ep_overview : <LazyField - value will be determined when it is accessed>
tvdb_ep_rating   : <LazyField - value will be determined when it is accessed>
tvdb_episode     : <LazyField - value will be determined when it is accessed>
tvdb_first_air_date: 2016-03-23 00:00:00
tvdb_genres      : [Talk Show]
tvdb_id          : 292421
tvdb_network     : CBS
tvdb_overview    : James Corden will take the reigns as host of THE LATE LATE SHOW on Monday, March 23, 2015. The 36-year-old comedian comes to American late night television with a growing list of award-winning and critically-acclaimed credits. He is a Tony Award-winning performer on Broadway, a BAFTA-winning star of UK television, and a feature film actor with two blockbuster releases this year. Now he'll bring all of those talents to host “The Late Late Show,” a nightly hour of comedy, music, and interviews with the biggest stars in the world.
tvdb_posters     : [thetvdb.com/banners/posters/292421-1.jpg, thetvdb.com/banners/posters/292421-3.jpg, thetvdb.com/banners/posters/292421-4.jpg, thetvdb.com/banners/posters/292421-2.jpg]
tvdb_rating      : 8.2
tvdb_runtime     : 45
tvdb_season      : <LazyField - value will be determined when it is accessed>
tvdb_series_name : The Late Late Show with James Corden
tvdb_status      : Continuing
tvdb_url         : thetvdb.com/index.php?tab=series&id=292421
zap2it_id        :

2016-09-23 09:42 DEBUG    series        mvtvshow        on_task_learn
2016-09-23 09:42 DEBUG    series        mvtvshow        marking 1 releases as downloaded for <Entry(title=james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks,state=accepted)>
2016-09-23 09:42 DEBUG    seen          mvtvshow        Learned 'james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks' (field: title, local: 1)
2016-09-23 09:42 DEBUG    seen          mvtvshow        Learned 'file:///mnt/deluge/tvshow/unrar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.rar/james.corden.2016.09.12.meg.ryan.720p.hdtv.x264-crooks.mkv' (field: url, local: 1)
2016-09-23 09:42 DEBUG    util.simple_persistence mvtvshow        Flushing simple persistence for task mvtvshow to db.
2016-09-23 09:42 DEBUG    task_queue                    task queue shut down
2016-09-23 09:42 INFO     ipc.rpyc                      listener closed
2016-09-23 09:42 INFO     ipc.rpyc                      server has terminated
2016-09-23 09:42 DEBUG    util.simple_persistence                 Flushing simple persistence for task None to db.
2016-09-23 09:42 DEBUG    manager                       Shutting down
2016-09-23 09:42 DEBUG    manager                       Removed /config/.config-lock```

Additional information:

  • Flexget Version: 2.3.32 (2.3.34 has same issue)
  • Python Version: 2.7.11
  • Installation method: pip2
  • OS and version: Arch Docker
  • Link to crash log: NA
  • manual query: thetvdb.com query produces expected results:
view-source: /api/GetEpisodeByAirDate.php?apikey=<flexgetapikey>&seriesid=292421&airdate=2016-09-12
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Episode>
<id>5742291</id>
<Combined_episodenumber>104</Combined_episodenumber>
<Combined_season>2</Combined_season>
<DVD_chapter></DVD_chapter>
<DVD_discid></DVD_discid>
<DVD_episodenumber></DVD_episodenumber>
<DVD_season></DVD_season>
<Director></Director>
<EpImgFlag></EpImgFlag>
<EpisodeName>Meg Ryan, Adam Scott, Brian Fallon</EpisodeName>
<EpisodeNumber>104</EpisodeNumber>
<FirstAired>2016-09-12</FirstAired>
<GuestStars></GuestStars>
<IMDB_ID></IMDB_ID>
<Language>en</Language>
<Overview></Overview>
<ProductionCode></ProductionCode>
<Rating></Rating>
<SeasonNumber>2</SeasonNumber>
<Writer></Writer>
<absolute_number></absolute_number>
<filename></filename>
<lastupdated>1473222543</lastupdated>
<seasonid>650075</seasonid>
<seriesid>292421</seriesid>
</Episode>
</Data>

Please verify that the following data is present before submitting your issue:

-Paste or link to a paste service (pastebin for example) of relevant config (preferably full config including templates if present. Remember to redact any personal information!

  • Paste or link to a paste service of debug level logs of relevant task/s. Use flexget -L debug execute --tasks <Task_name>
  • Flexget version (Use flexget -V to get it).
  • Full Python version (2.7.11 for example). Run python -V to get it.
  • Installation method (pip, git install, etc.)
  • OS and version
  • Attach crash log if available

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions