Ticket #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): |
Description
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
if:
- 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): http://thetvdb.com/api/4D297D8CFDE0E105/series/249633/default/2/8/en.xml
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
comment:2 Changed 16 months 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
