Resolve Windows Path Issues in Python with Visual Studio Code on Windows - DevPops-Inc/windows GitHub Wiki
• The following resolution is for resolving Windows path issues in Python.
•
• Go to up the import
statements, press the Enter key to create a new line and type from pathlib import PureWindowsPath
to import the PureWindowsPath
object from the pathlib
module.
•
• Go down to the Windows path you’re trying to use and wrap PureWindowsPath()
around the path.
•
• Replace the backslashes \
with forward slashes /
to eliminate any annoying escape character issues.
•
• Press the Run button and the script will run without any Windows path issues this time around.
•