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.

download_photos.py tries to connect to non-existing host p48-photosws.icloud.com

See original GitHub issue

Login and 2-factor auth succeeded:

$ ./download_photos.py ./dest/ --username foo@bar.com --password XXXXXXXX --size original
Signing in...
Updating photos...
Traceback (most recent call last):
  File "./download_photos.py", line 231, in <module>
    download()
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "./download_photos.py", line 55, in download
    updatePhotos(icloud)
  File "./download_photos.py", line 155, in updatePhotos
    icloud.photos.update()
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/pyicloud/base.py", line 306, in photos
    self.params
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/pyicloud/services/photos.py", line 35, in __init__
    params=self.params
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/requests/sessions.py", line 515, in get
    return self.request('GET', url, **kwargs)
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/pyicloud/base.py", line 67, in request
    response = super(PyiCloudSession, self).request(*args, **kwargs)
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
  File "/home/hreese/src/icloud_photos_downloader/venv/lib/python2.7/site-packages/requests/adapters.py", line 504, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='p48-photosws.icloud.com', port=443): Max retries exceeded with url: /ph/startup?clientBuildNumber=14E45&dsid=xxxxxxxxxxx&clientId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f47f80603d0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

Is that a bug in pyicloud or download_photos.py?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:32 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
chadjcommented, Jun 20, 2017

I’ve been working on picklepete/pyicloud#136 over in chadj/pyicloud/ckdatabasews and since it contains a few backwards compatibly issues I decided to update icloud_photos_downloader to be compatible with these changes. You can try out that update over at chadj/icloud_photos_downloader/ckdatabasews. You’ll need to install chadj/pyicloud/ckdatabasews first ofcourse.

I also added a new command line option

  --until-found INTEGER RANGE     Download most recently added photos until we
                                  find x number of previously downloaded
                                  consecutive photos (default: download all photos)

Which will drastically speed up what I think is the common use for using this command line tool

1reaction
chadjcommented, Jul 21, 2017

Try this @f1rf1n

sudo pip uninstall pyicloud
git clone https://github.com/chadj/icloud_photos_downloader.git
git checkout ckdatabasews
sudo pip install -r requirements.txt

Checking out the branch was missing from those steps

Read more comments on GitHub >

github_iconTop Results From Across the Web

download_photos.py tries to connect to non-existing host p48 ...
How do you do that? I tried with the command "iCloud --username xxxxxxx --delete-from-key ring" but I get a different error on the...
Read more >
Upload and download photos using iCloud.com - Apple Support
On iCloud.com, upload JPEG photos to iCloud Photos and download photos and videos stored in iCloud to your computer.
Read more >
iCloud Photos on iOS
Sign in to iCloud to access your photos, videos, documents, notes, contacts, and more. Use your Apple ID or create a new account...
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