The error you're seeing is likely caused by the backslashes (\
) in the file path. In Python, backslashes are used as escape characters, so you need to use an extra backslash to indicate that you want to include the backslash in the string, rather than using it as an escape character.
To fix this, you should replace all the backslashes in the file path with forward slashes (/
).
print("""<a href=r"\\ucd.int.com\user\ClientData\sigma\RPAOutput">link</a>""".replace('\\','/'))
Alternatively, you can use forward slashes instead of backslashes in the file path in the first place.
print("""<a href=r"//ucd.int.com/user/ClientData/sigma/RPAOutput">link</a>""")
This will work as forward slashes are not escape characters in python.
Also please note that, if you're trying to access a Windows file path, you should use double backslashes (\
) instead of single backslashes to separate directories.
print("""<a href=r"\\ucd.int.com\\user\\ClientData\\sigma\\RPAOutput">link</a>""")