Getting OS Error when passing string to pathlib.Path in windows
问题 How to pass string to pathlib.Path in Python3. I am dynamically passing normal windows path in Path(). But it is throwing error. the snippet is as below: src = "C:\Documents\Newsletters\Summer2018.pdf" rsrc = r"C:\Documents\Newsletters\Summer2018.pdf" s = pathlib.Path(src) rs = pathlib.Path(rsrc) print(s.exists()) # throws error print(rs.exists()) # returns True I want to pass normal string to Path, instead off raw string. Is there anyway to pass normal string to Path and check for its