https://blog.csdn.net/weixin_53370274/article/details/118971607
MQTT配合mysql使用报错AttributeError: 'NoneType' object has no attribute 'read'猜测是多线程的原因,多个线程共享了一个数据库连接解决方法执行sql时加上互斥锁import threading lock = threading.Lock() lock.acquire() cursor.execute(command,data) ...