报错:SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position xx: truncated

我给出的错误代码:

错误原因:文件路径输入问题

解决方法:

1、在前面加r

2、将 '\' 变为 '\\'

3、将 '\' 变为 '/' 

猜你喜欢

转载自blog.csdn.net/Starinfo/article/details/131813007