Anomalous backslash in string: '\`'. String constant might be missing an r prefix.
127
128 return
129 print(result)
130 char = "\`"131 await ctx.send(f"```{result.replace('`', char)}```")
132
133 @commands.command(aliases=["porn"])
Description
Backslash is present in the literal string but is not a valid escape sequence. If it is intended to be an escape sequence, use the correct escape characters. If it is intended to be a literal backslash, it can either be replaced with with an escaped backslash \\
, or you can add an r
prefix to make it a "raw" string.
Bad practice
filepath = "C:\myfiles\run.py"
Recommended
filepath = "C:\\myfiles\\run.py" # use `\\` to render one backslash
filepath = r"C:\myfiles\run.py" # use the `r` prefix to avoid unnecessary escapes