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

TypeError #9

Closed
artemryzhov opened this issue Mar 24, 2017 · 2 comments
Closed

TypeError #9

artemryzhov opened this issue Mar 24, 2017 · 2 comments

Comments

@artemryzhov
Copy link
Contributor

Hi! I have an error, when downloading my photos.

Signing in...
Updating photos...
Looking up all photos...
Downloading 2661 original photos and videos to ./photos/ ...
./photos/2014/04/02/2014-04-02 14-original.07-original.17-original.jpg already exists.:  38%|██████████████████████████                                           | 1006/2661 [00:26<04:25,  6.22it/s]Traceback (most recent call last):
  File "./download_photos.py", line 224, 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 93, in download
    created_date = parse(photo.created)
  File "/usr/local/lib/python2.7/dist-packages/pyicloud/services/photos.py", line 248, in created
    dt = datetime.fromtimestamp(self.data.get('createdDate') / 1000.0)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
@ndbroadbent
Copy link
Collaborator

Sorry about that, haven't seen that one before. I just pushed a change that should handle that error and skip any photos where it can't find a createdDate. (Not sure why that photo doesn't have a createdDate, though.)

@artemryzhov
Copy link
Contributor Author

Thank you! Very cool script!
Maybe creatateDate not have the old photos that I uploaded to iCloud from my computer.

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