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

traceback: created_date = photo.created.astimezone(get_localzone()) OSError: [Errno 22] Invalid argument #120

Closed
ekinsol opened this issue Dec 23, 2018 · 2 comments

Comments

@ekinsol
Copy link

ekinsol commented Dec 23, 2018

Hi,

I get this error around 72% (on every run):

HEVC.MOV already exists.: 21%|##9 | 4498/20995 [01:49<06:59, 39.28it/s] E:\icloud_photos\2015/07/16\IMG_4901.JPG already exists.: 72%|############9 | 15074/20995 [05:27<01:32, 63.88it/s]Traceback (most recent call last):
File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python37\Scripts\icloudpd.exe_main
.py", line 9, in
File "c:\python37\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "c:\python37\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\python37\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python37\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\python37\lib\site-packages\icloudpd\base.py", line 335, in main
created_date = photo.created.astimezone(get_localzone())
OSError: [Errno 22] Invalid argument

It seems to be related to the created_date

Kind Regards,
Nicky

PS: Already glad I managed to fetch all the other files ;-)

@ndbroadbent
Copy link
Collaborator

Hello, sorry about that! I was already catching a ValueError here for invalid dates, but looks like Python can also throw an OSError sometimes.

I've released version 1.4.2 which should fix this issue. Instead of a crash, you'll see an error message like this:

Could not convert photo created date to local timezone (...)

Hope that helps!

@ekinsol
Copy link
Author

ekinsol commented Dec 23, 2018

Hello, sorry about that! I was already catching a ValueError here for invalid dates, but looks like Python can also throw an OSError sometimes.

I've released version 1.4.2 which should fix this issue. Instead of a crash, you'll see an error message like this:

Could not convert photo created date to local timezone (...)

Hope that helps!

It sure helps, now on 73%! Thank you very much :-)

Merry Christmas ;-)

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

No branches or pull requests

2 participants