SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
程序员文章站
2022-06-15 13:41:07
...
python使用模块os查看文件列表时报错
解决方法:
修改文件路径C:\Users\fan\Desktop
类似所有‘\’都需要解析
os.listdir('C:\\Users\\fan\\Desktop') 即可
上一篇: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
下一篇: JavaScript继承
推荐阅读
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
报错:SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX
-
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UX