Python:SyntaxError:(unicode error) 'unicodeescape' codec can't decode bytes in pos
阅文时长 | | 0.7分钟 | 字数统计 | | 1123.2字符 |
主要内容 | | 1、引言&背景 2、解决方案 3、声明与参考资料 | ||
『Python:SyntaxError:(unicode error) 'unicodeescape' codec can't decode bytes in pos』 | |||
编写人 | | SCscHero | 编写时间 | | 2022/1/10 PM8:8 |
文章类型 | | 系列 | 完成度 | | 已完成 |
座右铭 | 每一个伟大的事业,都有一个微不足道的开始。 |
一、引言&背景完成度:100%
a) 应对问题
Python报错如下如图:
目前创新互联公司已为数千家的企业提供了网站建设、域名、虚拟空间、绵阳服务器托管、企业网站设计、莘县网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。
......
Traceback (most recent call last):
File "C:\LIST.ENV\env.006.Python_ALL\64bit_3.9.6\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\LIST.ENV\env.006.Python_ALL\64bit_3.9.6\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\Users\shaoczha\.vscode\extensions\ms-python.python-2021.8.\pythonFiles\lib\python\debugpy\__main__.py", line 45, in
cli.main()
File "c:\Users\shaoczha\.vscode\extensions\ms-python.python-2021.8.\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 444, in main
run()
File "c:\Users\shaoczha\.vscode\extensions\ms-python.python-2021.8.\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "C:\LIST.ENV\env.006.Python_ALL\64bit_3.9.6\lib\runpy.py", line 267, in run_path
code, fname = _get_code_from_file(run_name, path_name)
File "C:\LIST.ENV\env.006.Python_ALL\64bit_3.9.6\lib\runpy.py", line 242, in _get_code_from_file
code = compile(f.read(), fname, 'exec')
File "XXXXXXXXXXXXXXXXXXXXXXXX.py", line 255
save_variable(X_train,'C:\LIST.MeGitCloud List\x.txt')
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 23-24: truncated \xXX escape
标题名称:Python:SyntaxError:(unicode error) 'unicodeescape' codec can't decode bytes in pos
文章起源:http://scyanting.com/article/dsojdjp.html