应为这样吧 cur.execute("INSERT INTO athomes(temperature) VALUES(‘“+value1+”’)")
试试: cur.execute("INSERT INTO athomes(temperature) VALUES(%r)"%value1)