python - not all arguments converted during string formatting for select -


i can not select database have error:

not arguments converted during string formatting

my script is:

bo=str(mac) cur.execute("""select * devices mac= %s """,bo) 

you need add % in front of bo, this:

bo=str(mac) cur.execute("""select * devices mac= %s """, %bo) 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - Gamma correction doesn't look properly corrected, is this linear? -