常见问题记录

1、python3访问mysql数据库,报错

TypeError:%d format: a number is required, not str

原因:port不是int类型,mysql_port的需要填一个int而不是str类型的

解决方法:将port='3306'转换成int类型,即 port=int('3306')


2、编写自动检测邮箱是否收到新邮件程序时遇到的问题

imaplib.IMAP4.error: command SEARCH illegal in state AUTH, only allowed in states SELECTED


解决方法:参考https://blog.csdn.net/iteye_13695/article/details/82679570

在http://config.mail.163.com/settings/imap/index.jsp?uid=YOUR_EMAIL_NAME@126.com中进行绑定手机号的配置即可

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。