Closed pertoft closed 3 weeks ago
@pertoft that simply means there isn't another page. Instead of returning None
, it throws an exception. I agree that should be changed to returning None, though.
Considering helping the community by letting them find this issue, if it makes sense, consider closing.
Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #209 for more information
Error: AttributeError: 'ChildrenCollectionPage' object has no attribute '_next_page_link'
Terminal output: 0 : 20180408_155657.jpg 1 : 20180408_160051.jpg 2 : 20180408_160150.jpg <class 'onedrivesdk.model.children_collection_page.ChildrenCollectionPage'> 0 : 20180414_181319.jpg 1 : 20180418_164440.jpg 2 : test2.jpg The thread 'MainThread' (0x4580) has exited with code 0 (0x0). Traceback (most recent call last): File "C:\Users\pto\source\repos\OneDrivePhotoOrganizer\OneDrivePhotoOrganizer\OneDrivePhotoOrganizer.py", line 89, in
collection = onedrivesdk.ChildrenCollectionRequest.get_next_page_request(collection, client).get()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\onedrivesdk\request\children_collection.py", line 105, in get_next_page_request
if collection_page._next_page_link:
AttributeError: 'ChildrenCollectionPage' object has no attribute '_next_page_link'
Steps to reproduce: ... auth part... ` src_folder = "/test/src" dst_folder = "/test/dst/"
collection = client.item(path=src_folder).children.request(top=3).get()
for count, item in enumerate(collection): print("{} : {}".format(count,item.name))
while (collection is not None): collection = onedrivesdk.ChildrenCollectionRequest.get_next_page_request(collection, client).get() print(type(collection)) for count, item in enumerate(collection): print("{} : {}".format(count,item.name)) `