由于某些原因,当我在WindowsServer2016上运行python脚本时,出现了错误SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
。
在我的电脑上一切正常。你知道吗
我用来执行程序的行:
cmd = "C:\Users\Administrator\Desktop\GTA - San Andreas\samp.exe\samp.exe jade.nephrite.ro"
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, creationflags=0x08000000)
process.wait()
对
"c:\Users..."
使用原始字符串。\U
开始python3上的Unicode转义序列,其中字符串是默认的Unicode。你知道吗相关问题 更多 >
编程相关推荐