spyder错误合集

SyntaxError: invalid syntax是非法语句的意思,检查语法是否出现错误,漏写等
 
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated UXXXXXXXX escape
是文件路径出错
有三种方法:
1、在路径前面加r,即保持字符原始值的意思。
2、将单斜杠替换为双反斜杠
3、将单斜杠替换为正斜杠
 
imported but unused
是warning不是error
表示你读取了还没有用到的库
 
python中字符串的最后一个字符是斜杠会导致出错:SyntaxError: EOL while scanning string literal
 
Proceed ([y]/n)?           询问你是否覆盖旧版本,在命令行输入y即可进行下一步的安装操作了
 
加载包    pip install
 
NameError: name 'file' is not defined          将file函数改为open函数
 
原文地址:https://www.cnblogs.com/asdfknjhu/p/12076568.html