pyicloud
pyicloud copied to clipboard
Show keyError when authentication with username and password
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
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'
I meet the same issue,bro.what should we do?
just replace icloud.com by icloud.com.cn in file /pyicloud/base.py
thanks ,it really works. 爱你老哥
只需在文件 /pyicloud/base.py 中将 icloud.com 替换为 icloud.com.cn 即可
it work for me, thank u