Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: time data 'November 30, -0001' does not match format '%B %d, %Y' #838

Closed
aunefyren opened this issue Apr 26, 2022 · 3 comments
Closed
Assignees
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet

Comments

@aunefyren
Copy link

Version Number

1.16.5

What branch are you on?

master

Describe the Bug

The building of a collection crashed because of some metadata that couldn't get parsed into a DateTime object. I am guessing the show it pulled data from had -0001 as the year, and the code couldn't handle the value when trying to create an object.

Traceback (most recent call last): |
| File "/app/pmm/plex_meta_manager.py", line 490, in run_collection |
| radarr_add, sonarr_add = builder.run_missing() |
| File "/app/pmm/modules/builder.py", line 2219, in run_missing |
| show = self.config.TVDb.get_series(missing_id) |
| File "/app/pmm/modules/tvdb.py", line 136, in get_series |
| return TVDbObj(tvdb_url, self.tvdb_language, False, self.config) |
| File "/app/pmm/modules/tvdb.py", line 100, in init |
| self.released = datetime.strptime(released, "%B %d, %Y") if released else released |
| File "/usr/lib/python3.9/_strptime.py", line 568, in _strptime_datetime |
| tt, fraction, gmtoff_fraction = _strptime(data_string, format) |
| File "/usr/lib/python3.9/_strptime.py", line 349, in _strptime |
| raise ValueError("time data %r does not match format %r" % |
| ValueError: time data 'November 30, -0001' does not match format '%B %d, %Y' |
| |
| Unknown Error: time data 'November 30, -0001' does not match format '%B %d, %Y'

Relevant Collection/Playlist Definition

templates:
    Holiday:
        url_poster: <<poster>>
        sort_title: +++++++_<<collection_name>>
        collection_order: release
        collection_mode: hide
collections:
  Norsk:
    template: {name: Holiday, poster: https://i.imgur.com/CBoNbYg.jpeg }
    imdb_list:
    - url: https://www.imdb.com/search/title/?title_type=tv_series,tv_miniseries&release_date=1950-01-01,&countries=no&languages=no
    summary: Serier som har norsk som hovedspråk.
    visible_home: true
    visible_shared: true
    collection_order: release.desc

Logs

https://gist.github.com/aunefyren/a97bcd03fe3b410df741df9e59964954

@aunefyren aunefyren added bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet labels Apr 26, 2022
@meisnate12
Copy link
Member

ill add a catch for it odd that the show has a year of -0001
https://thetvdb.com/series/torsdag-kveld-fra-nydalen

@aunefyren
Copy link
Author

ill add a catch for it odd that the show has a year of -0001 https://thetvdb.com/series/torsdag-kveld-fra-nydalen

Yeah, I agree. Pretty stupid, but if their system allows it, it can happen again even if we fix it.

meisnate12 added a commit that referenced this issue May 3, 2022
meisnate12 added a commit that referenced this issue May 7, 2022
@meisnate12
Copy link
Member

Added in 1.17.0

nwithan8 pushed a commit to nwithan8/Plex-Meta-Manager that referenced this issue Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet
Projects
None yet
Development

No branches or pull requests

2 participants