mandarons / icloudpy

iCloud web service interface library in Python
Other
195 stars 20 forks source link

[BUG] api.files.dir() returns KeyError: 'dsid' #18

Closed CyberInt1979 closed 1 year ago

CyberInt1979 commented 1 year ago

Describe the bug Calling api.files.dir() returns KeyError: 'dsid'

To Reproduce api = ICloudPyService('########', '########') ....2FA extra work.... api.files.dir()

Expected behavior Return ubiquity files list

Console output File "/Users/cyber/Desktop/development/icloudpy/test_ubiquity", line 64, in for i in api.files.dir(): File "/Users/cyber/Desktop/development/icloudpy/icloudpy/services/ubiquity.py", line 44, in getattr return getattr(self.root, attr) File "/Users/cyber/Desktop/development/icloudpy/icloudpy/services/ubiquity.py", line 21, in root self._root = self.get_node(0) File "/Users/cyber/Desktop/development/icloudpy/icloudpy/services/ubiquity.py", line 30, in get_node request = self.session.get(self.get_node_url(node_id)) File "/Users/cyber/Desktop/development/icloudpy/icloudpy/services/ubiquity.py", line 26, in get_node_url return self._node_url % (self.params["dsid"], variant, node_id) KeyError: 'dsid' python-BaseException

Process finished with exit code 1

Additional context The same problem also occurs on the https://github.com/picklepete/pyicloud project. In case it's a bug, do you have any plans to fix it for icloudpy? Thanks you for your support :)

mandarons commented 1 year ago

Looks like #25 fixed it.