jakewaldron / PlexEmail

This script aggregates all new TV, movie and music releases for the past configured time then optionally writes to your web directory and sends out an email.
206 stars 32 forks source link

ValueError: Year out of range #87

Open rustymyers opened 6 years ago

rustymyers commented 6 years ago

Turns out I can't have media that's older than 1902. This occurred on some audiobooks where the text was originally released before 1902.

Traceback (most recent call last):
  File "/opt/plexemail/scripts/plexEmail.py", line 1580, in <module>
    print time.strftime(sections[section[0]]['format'], time.strptime(displayText, '%Y-%m-%d %H:%M:%S'))
ValueError: year out of range

Work around is to delete or modify date on album to eliminate issue. Perhaps a check for this and a skip?

Source: https://stackoverflow.com/questions/37521247/how-to-format-0000-00-00-000000-using-strftime-in-python