pyicloud icon indicating copy to clipboard operation
pyicloud copied to clipboard

KeyError: 'webservices'

Open godsbball opened this issue 2 years ago • 0 comments

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

  • pyiCloud release with the issue (pip show pyicloud): 1.0.0
  • Last working pyiCloud release (if known):
  • Service causing this issue: Authentication
  • Python version (python -V): 3.8.13
  • Operating environment (project deps/Docker/Windows/etc.): Ubuntu conda 4.5.11

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

godsbball avatar Jan 18 '23 14:01 godsbball