pyicloud icon indicating copy to clipboard operation
pyicloud copied to clipboard

Show keyError when authentication with username and password

Open guoxiaolu1989 opened this issue 2 years ago • 5 comments

The problem

Environment

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

Traceback/Error logs


Checklist

  • [ ] I've looked informations into the README.
  • [ ] I've looked informations into the pyiCloud's code.
  • [ ] I've looked informations in Google.

Additional information

guoxiaolu1989 avatar Aug 30 '23 08:08 guoxiaolu1989

def get_apple_token(): from pyicloud import PyiCloudService

api = PyiCloudService('username', 'password')

File "D:\Python3\Lib\site-packages\pyicloud\base.py", line 337, in authenticate self._webservices = self.data["webservices"] KeyError: 'webservices'

guoxiaolu1989 avatar Aug 30 '23 08:08 guoxiaolu1989

I meet the same issue,bro.what should we do?

Whylickspittle avatar Sep 06 '23 04:09 Whylickspittle

just replace icloud.com by icloud.com.cn in file /pyicloud/base.py

guoxiaolu1989 avatar Sep 06 '23 06:09 guoxiaolu1989

thanks ,it really works. 爱你老哥

Whylickspittle avatar Sep 06 '23 06:09 Whylickspittle

只需在文件 /pyicloud/base.py 中将 icloud.com 替换为 icloud.com.cn 即可

it work for me, thank u

Samge0 avatar Aug 28 '24 07:08 Samge0