question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Year is Out of Range Bug

See original GitHub issue

I’m trying to import all my photos from icloud. When it gets to a certain point it fails with the error:

/home/luke/Pictures/2016/09/24/IMG_3101-original.JPG already exists.:  55%|▌| 18392/33335 [09:22<08:43, 28.56it/s]Traceback (most recent call last):
  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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
evenwebbcommented, May 29, 2018

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 😃

On Tue, 29 May 2018 at 08:48, lapint notifications@github.com wrote:

I opened an issue in pyicloud https://github.com/picklepete/pyicloud/issues/180 because it looked like it could be rooted there?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ndbroadbent/icloud_photos_downloader/issues/74#issuecomment-392684224, or mute the thread https://github.com/notifications/unsubscribe-auth/AAy-nCkjf2pA_DFyj4_OZBJlZrLCiT6lks5t3P0ygaJpZM4UQr2q .

0reactions
ndbroadbentcommented, Jul 21, 2018

Thanks for reporting this issue! I’ve fixed this with a workaround - https://github.com/picklepete/pyicloud/pull/184. If the date is invalid, I’ll just set it to 1/1/1970 (the earliest valid date in Unix time).

I’ve also decided to store a copy of the pyicloud library in this repo (under ./vendor/pyicloud-0.9.1.zip), because some people were having problems installing my fork from github. The requirements.txt has also been updated to point to this vendored copy.

So I’ve just updated that with this bugfix, and you can start using the fix by running git pull, then pip install -r requirements.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

ClickHouse Error: year 54725 is out of range #21678 - GitHub
ClickHouse Error year 54725 is out of range This may be triggered by: Issue 1002 - The database returned an unexpected error. Screenshots....
Read more >
Python how to fix year out of range error - Stack Overflow
Well, there's a lot to say. First, pandas automatically detects the type for each columns. With your csv data, everything was correctly ...
Read more >
How to fix Tableau Server error: Year out of range exception?
Hello,. I'm trying to edit the dashboard using Web Edit on Tableau Server but I'm unable to get around this error - clicking...
Read more >
year is out of range - Error (#1152) · Issues - Projects
While loading an excel file it is throwing year out of range error. I don't have idea from which cell it is throwing....
Read more >
Year out of range error - Oracle Communities
BatchUpdateException : Year out of range. We are running ODI scenario and it tries to read from source and load into target both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found