閱文時(shí)長(zhǎng) | | 0.7分鐘 | 字?jǐn)?shù)統(tǒng)計(jì) | | 1123.2字符 |
主要內(nèi)容 | | 1、引言&背景 2、解決方案 3、聲明與參考資料 | ||
『Python:SyntaxError:(unicode error) 'unicodeescape' codec can't decode bytes in pos』 | |||
編寫(xiě)人 | | SCscHero | 編寫(xiě)時(shí)間 | | 2022/1/10 PM8:8 |
文章類(lèi)型 | | 系列 | 完成度 | | 已完成 |
座右銘 | 每一個(gè)偉大的事業(yè),都有一個(gè)微不足道的開(kāi)始。 |
Python報(bào)錯(cuò)如下如圖:
目前創(chuàng)新互聯(lián)公司已為數(shù)千家的企業(yè)提供了網(wǎng)站建設(shè)、域名、虛擬空間、綿陽(yáng)服務(wù)器托管、企業(yè)網(wǎng)站設(shè)計(jì)、莘縣網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長(zhǎng),共同發(fā)展。
......
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