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 - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -