pyicloud icon indicating copy to clipboard operation
pyicloud copied to clipboard

ubiquity - pyicloud.exceptions.PyiCloudAPIResponseError: Service Unavailable (503)

Open miloskv opened this issue 7 years ago • 7 comments

Hi there

I'm receiving a traceback after exception is hit when I try to use "api.files" service (ubiquity). I am able to use successfully other service that I tested (api.devices)

I'm not sure if something changed in iCloud Drive that is causing this.

Traceback (most recent call last):
  File "./icloud.py", line 39, in <module>
    main()
  File "./icloud.py", line 35, in main
    print(dir(api.files.root))
  File "/Users/xxx/virtualenvs/icloud_attempt/lib/python3.6/site-packages/pyicloud/services/ubiquity.py", line 44, in root
    self._root = self.get_node(0)
  File "/Users/xxx/virtualenvs/icloud_attempt/lib/python3.6/site-packages/pyicloud/services/ubiquity.py", line 24, in get_node
    request = self.session.get(self.get_node_url(id))
  File "/Users/xxx/virtualenvs/icloud_attempt/lib/python3.6/site-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/Users/xxx/virtualenvs/icloud_attempt/lib/python3.6/site-packages/pyicloud/base.py", line 74, in request
    self._raise_error(response.status_code, response.reason)
  File "/Users/xxx/virtualenvs/icloud_attempt/lib/python3.6/site-packages/pyicloud/base.py", line 122, in _raise_error
    raise api_error
pyicloud.exceptions.PyiCloudAPIResponseError: Service Unavailable (503)

miloskv avatar Nov 13 '18 08:11 miloskv

It looks like this is all the way down when you first try to make a request to log-in (PyiCloudAPIResponseError); I'm wondering if this is because of some Internet error or VirtualEnv setting where the script can't make a request to iCloud --> if it was a PyiCloudFailedLoginException, I'd say it was because of incorrect login information.

dsouzarc avatar Dec 06 '18 23:12 dsouzarc

Hi,

Thanks for your reply. The same script works when I query other services. It’s just icloud service that’s failing for me

I will send you some outputs later if you want to show you what works and what does not

Milos

Sent from my iPhone

On 7 Dec 2018, at 7:06 AM, dsouzarc [email protected] wrote:

It looks like this is all the way down when you first try to make a request to log-in (PyiCloudAPIResponseError); I'm wondering if this is because of some Internet error or VirtualEnv setting where the script can't make a request to iCloud --> if it was a PyiCloudFailedLoginException, I'd say it was because of incorrect login information.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

miloskv avatar Dec 06 '18 23:12 miloskv

Hi, I experience the same error.

Vinz87 avatar Jan 06 '19 08:01 Vinz87

Hi !

Is the issue still there with the new version of the lib ?

Thanks

Quentame avatar Mar 19 '20 10:03 Quentame

Hi !

Is the issue still there with the new version of the lib ?

Thanks

I get the same error in 0.9.6.1. How can I add proxy to fiddler and close ssl cert verify?

landall avatar Apr 11 '20 14:04 landall

@landall Have a look at https://github.com/picklepete/pyicloud/blob/master/CODE_SAMPLES.md#debug-build-of-pyicloud which explains how to disable SSL verification for use with fiddler. But it also shows, how to get dumps of what requests are sent on the wire, which might mean you do not even need fiddler.

ixs avatar Aug 13 '20 14:08 ixs

If I'm printing out the URL of the request that yields a 503 I get something like:

https://p09-ubiquityws.icloud.com:443/ws/123123123/item/0

The Content-Length is 23 bytes and says:

Account migrated

miku avatar Jun 18 '22 21:06 miku