SO names: ")
                  
                  
                  
                  
                  
                  print(sonames)
                  
                  
                  
                  
                  
                  get_mails = """ SELECT name,email
                  
                  
                  FROM get_mail_by_soname(%s)
                  
                  
                  """
                  
                  
                  cur_main.execute(get_mails,(sonames))
                  
                  
                  
                  
                  
                  data = cur_main.fetchall()
                  
                  
                  
                  
                  
                  for row in data:
                  
                  
                          print(row[0],row[1])
                  
                  
                  
                  
                  
                  conn_main.close()
                  
                  
                  
                  
                  
                   python /home/get_mail_by_soname.py
                  
                  
                  Enter SO names: 'SO451250'
                  
                  
                  'SO451250'
                  
                  
                  Traceback (most recent call last):
                  
                  
                    File "/home/get_mail_by_soname.py", line 21, in <module>
                  
                  
                      cur_main.execute(get_mails,(sonames))
                  
                  
                  TypeError: not all arguments converted during string formatting
                  
                  
                
>2019 >python 2.7 Вот что неправильно
Попробуй cur_main.execute(get_mails,(sonames,))
что, файл в /home?
Обсуждают сегодня