这里收集了 python 开发中,遇到的各类错误异常及相应的解决方案。
常见错误
- python 运行报错 TypeError: unhashable type: 'dict' 原因及解决方法
- pymysql 报错 'You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column'
- pymysql 报错 UnicodeEncodeError: 'latin-1' codec can't encode character '\u5e02' in position 116: ordinal not in range(256)
- python pymsql execute 报错 TypeError: execute() takes from 2 to 3 positional arguments but 6 were given