Skip to content

Error while expanding folders for the sharepoint library #645

Open
@masics

Description

@masics

I get following error while executing:

folder: Folder = ctx.web.folders.get_by_path('My_Library')
ctx.load(folder, ["Folders"]).execute_query()

office365.runtime.client_request_exception.ClientRequestException: ('-1, Microsoft.Data.OData.ODataException', "Invalid JSON. A comma character ',' was expected in scope 'Object'. Every two elements in an array and properties of an object must be separated by commas.", '400 Client Error: Bad Request for url: https://mysharepoint.sharepoint.com/sites/MySite/_api/Web/folders/GetByPath(@v)?@v=%7B%22DecodedUrl%22:%20%22My_Library%22%7D?$expand=Folders')

The My_Library is a library created via Teams.

I cannot see My_Library when running code examples/sharepoint/folders/list_folders.py

What I could do to get list of folders?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions