picklepete / pyicloud

A Python + iCloud wrapper to access iPhone and Calendar data.
MIT License
2.45k stars 437 forks source link

KeyError: 'webservices' #419

Open godsbball opened 1 year ago

godsbball commented 1 year ago

The problem

After I inputting an Chinese account and password, I encounterred KeyError: 'webservices'. However, when I replace the account with an American one, everything seems to go on well. It seems that the api depends on the domain or region.

Environment

Traceback/Error logs

Traceback (most recent call last):
  File "/home/burst/anaconda3/envs/pyicloud/bin/icloud", line 8, in <module>
    sys.exit(main())
  File "/home/burst/anaconda3/envs/pyicloud/lib/python3.8/site-packages/pyicloud/cmdline.py", line 191, in main
    api = PyiCloudService(username.strip(), password.strip())
  File "/home/burst/anaconda3/envs/pyicloud/lib/python3.8/site-packages/pyicloud/base.py", line 271, in __init__
    self.authenticate()
  File "/home/burst/anaconda3/envs/pyicloud/lib/python3.8/site-packages/pyicloud/base.py", line 337, in authenticate
    self._webservices = self.data["webservices"]
KeyError: 'webservices'

Additional information