Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'webservices' #35

Open
asahiqin opened this issue Mar 2, 2025 · 1 comment
Open

KeyError: 'webservices' #35

asahiqin opened this issue Mar 2, 2025 · 1 comment

Comments

@asahiqin
Copy link

asahiqin commented Mar 2, 2025

The problem

I found this issue in the previous issue, but with the enablement of the china_mainland option, it should have been resolved. However, I encountered this bug again.

Environment

  • I cloned this project and ran pip install ./
  • Python 3.13.2

Traceback/Error logs

Traceback (most recent call last):
  File "/Volumes/File/test/test_pyicloud.py", line 5, in <module>
    api = PyiCloudService('******', '****', china_mainland=True)
  File "/Volumes/File/test/venv/lib/python3.13/site-packages/pyicloud/base.py", line 341, in __init__
    self.authenticate()
    ~~~~~~~~~~~~~~~~~^^
  File "/Volumes/File/test/venv/lib/python3.13/site-packages/pyicloud/base.py", line 386, in authenticate
    self._webservices = self.data["webservices"]
                        ~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'webservices'

Additional information

variable data in _authenticate_with_token function

{
    'accountCountryCode': None, 
    'dsWebAuthToken': None,
    'extended_login': True, 
    'trustToken': ''
}

PyiCloudServies class's attribute data

{'error': 'Missing apple_id field', 'success': False}
@timlaing
Copy link
Owner

@asahiqin Many thanks for reporting. I will take a look at this shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants