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

ValueError: year is out of range #180

Closed
mrpintcom opened this issue May 29, 2018 · 2 comments · Fixed by #184
Closed

ValueError: year is out of range #180

mrpintcom opened this issue May 29, 2018 · 2 comments · Fixed by #184

Comments

@mrpintcom
Copy link

I'm trying to use pyicloud in the icloud-photos-downloader package to pull all my photos and videos.

However, part way through I encounter the following error:

  File "./download_photos.py", line 304, in <module>
    download()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "./download_photos.py", line 152, in download
    created_date = photo.created.astimezone(get_localzone())
  File "/usr/local/lib/python2.7/dist-packages/pyicloud/services/photos.py", line 451, in created
    return self.asset_date
  File "/usr/local/lib/python2.7/dist-packages/pyicloud/services/photos.py", line 457, in asset_date
    tz=pytz.utc)
ValueError: year is out of range
@mrpintcom
Copy link
Author

mrpintcom commented May 30, 2018

The issue still exists, however I was able to get around it by following another users advice.

@evenwebb:

I had this issue. I created a smart album in Photos on Mac to display all
photos older than 1990 and deleted the ones that came up as they had
corrupted dates. The years were set to 0000. It was some filter app that I
had used years back.

Hope this helps :)

@ndbroadbent
Copy link
Contributor

Fixed in #184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants