Describe the bugFailed to download /app/icloud/drive/<path>/<to>/<file>: 'data_token' error for some of .pages documents in drive.
To Reproduce
Steps to reproduce the behavior:
api = ICloudPyService(username.strip(), password.strip())
drive = api.drive
for i in api.drive.dir()
item = drive[i]
if item.type == "file":
localfile = os.path.join('.', item.name)
with item.open(stream=True) as response:
with open(localfile, "wb") as file_out:
copyfileobj(response.raw, file_out)
This produces a KeyError: 'data_token' before this patch when a packaged file like a Pages is attempted to be downloaded.
Expected behavior
File should be downloaded without error.
Screenshots
NA
Configuration
Default configuration.
Describe the bug
Failed to download /app/icloud/drive/<path>/<to>/<file>: 'data_token'
error for some of.pages
documents indrive
. To Reproduce Steps to reproduce the behavior: api = ICloudPyService(username.strip(), password.strip()) drive = api.drive for i in api.drive.dir() item = drive[i] if item.type == "file": localfile = os.path.join('.', item.name) with item.open(stream=True) as response: with open(localfile, "wb") as file_out: copyfileobj(response.raw, file_out)This produces a KeyError: 'data_token' before this patch when a packaged file like a Pages is attempted to be downloaded.
Expected behavior File should be downloaded without error.
Screenshots NA Configuration Default configuration.
Additional context From: https://github.com/mandarons/icloud-drive-docker/issues/11