Office365-REST-Python-Client
Office365-REST-Python-Client copied to clipboard
Error calling `read()` on file with single quote in name
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.