Skip to content

Error calling read() on file with single quote in name #808

Open
@ipmb

Description

@ipmb

I'm running version 2.5.2 and hitting an error that looks like #266. When I call the .read() method on a Sharepoint file with a ' in the filename, I get this response:

{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The expression \"web/getFileByServerRelativePath(DecodedUrl='/file_with_'_in_name')/$value\" is not valid."}}}

No error is raised as I would expect, just a string with those contents.

If, instead I call file.get_content().execute_query().value, I get the expected contents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions