Opened 3 years ago

Closed 2 years ago

#1342 closed help (worksforme)

Problems using ep_air_date if it can't be retrieved from TVDB

Reported by: cpettigrew Owned by:
Priority: minor Milestone: Help
Component: Plugins Keywords: TVDB
Cc: Version (eg. 1.0r2700):


I'm seeing some strange behavior with ep_air_date whereby if it can't be downloaded, I get the following error:

Error occurred in if statement: TypeError("can't compare datetime.datetime to NoneType",)

In my config file I have specified this as a required field:

    thetvdb_lookup: yes
    require_field: ep_air_date
      - ep_air_date < now - timedelta(days=30): reject
      - ep_air_date > now: reject

and there are instances where flexget does reject the show if the air date is not present. I have found, however, that the above error is immediately preceded by the following (note, in this case, it is with series premiers, however, it also occurs in other sections of my config):

2011-11-24 10:13 WARNING  api_tvdb      Series_Premieres Could not retrieve url (HTTP 404 error):

This will happen a few times for different series IDs (read as: It isn't limited to this one specific series ID).

I'm not exactly sure what is happening, but it would seem that if there is an error actually retrieving the ep_air_date, then for some reason, FlexGet still tries to perform the 'if' statement.

Any thoughts?

Change History (3)

comment:1 Changed 3 years ago by paranoidi

  • Milestone changed from 1.0 to Help

comment:2 Changed 2 years ago by Tw|tch

I'm just going to poke this ticket.. I got the same error using basically the same setup..

Edit: I seem to have gotten past this by doing the following:

      - ep_air_date != None and ep_air_date < now - timedelta(days=30): reject
      - ep_air_date != None and ep_air_date > now: reject
Last edited 2 years ago by Tw|tch (previous) (diff)

comment:3 Changed 2 years ago by Tw|tch

  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.