If you try to access a Pythonista iCloud file when it is not yet downloaded on your
local device, you get an access error.
You can force a Pythonista iCloud file to be downloaded by this small code:
from objc_util import *
path = '/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/Mes Pastels/Mes Pastels.pdf'
url = nsurl('file://' + path.replace(' ','%20'))
NSFileManager = ObjCClass('NSFileManager').defaultManager()
ret = NSFileManager.startDownloadingUbiquitousItemAtURL_error_(url, None)
print(ret) # True if ok
Files app: iCloud Drive/Pythonista/My folder before

Files app: iCloud Drive/Pythonista/My folder after
