You forgot the quote at the end of the string.
Also, the INSERT statement wants a list of column names; my_argv[2]
is not a column name.
Furthermore, %s
is not a database parameter marker; use ?
instead.
Additionally, getpass
is a module; you cannot call it.
sql = "INSERT INTO info_calc (application,version,path,os,user,ip) "+
"VALUES (?,?,?,?,?,?)"
args = my_argv[2], my_argv[3], my_argv[4], sys.platform, getpass.getuser(), machine
c.execute(sql, args)