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

ubuntu - How to disable Kernel Module Signing in linux -

java - Ebean enhancement ignores a model -

How to combine associative arrays in bash? -