Python Forum
Python Error- TypeError: ('Params must be in a list, tuple, or Row', 'HY000')
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Error- TypeError: ('Params must be in a list, tuple, or Row', 'HY000')
#1
I have a python error TypeError: ('Params must be in a list, tuple, or Row', 'HY000') but I don't know how to fix any suggestions my code is below:

if len(strSsn.strip()) > 0:
   s20tuple = ("MICROS",strStoreId,strInDate,strOutDate,strInTime,strOutTime,
               formatSsn(strSsn),intPayRate,intTips,intReghours,intOthours,strPositionde,
               intEmpAdj)
   s20tuple = tuple(s20tuple)


   server = '*******' 
   database = '******' 
   username = '************' 
   password = '************' 
            
   with pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password) as myDbConn:
        with myDbConn.cursor() as cursor:
             cursor.executemany("""INSERT INTO s20data(clockdata,storeid,indate,outdate,indatetime,outdatetim,
                                 ssn,payrate,tips,reghours,othours,positionde,empadj) VALUES {?,?,?,?,?,?,?,?,?,?,?,?,?""",s20tuple)
             myDbConn.commit()

      
Reply
#2
please post complete unaltered error traceback (in error tags)
It contains valuable data which can be used in diagnosis.
Reply
#3
How I do that?
Reply
#4
you can use cut and paste to capture error, then surround with error tags
you can also highlight the error message after pasting and then click on the X (with circle) icon.
see: https://python-forum.io/misc.php?action=help&hid=25
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  using > < for tuple , list,... akbarza 3 401 Feb-05-2024, 01:18 PM
Last Post: deanhystad
  error in class: TypeError: 'str' object is not callable akbarza 2 445 Dec-30-2023, 04:35 PM
Last Post: deanhystad
Question mypy unable to analyse types of tuple elements in a list comprehension tomciodev 1 427 Oct-17-2023, 09:46 AM
Last Post: tomciodev
  Change font in a list or tuple apffal 4 2,635 Jun-16-2023, 02:55 AM
Last Post: schriftartenio
  boto3 - Error - TypeError: string indices must be integers kpatil 7 1,184 Jun-09-2023, 06:56 PM
Last Post: kpatil
  Error TypeError: output_type_handler() takes 2 positional arguments but 6 were given paulo79 1 1,858 Oct-17-2022, 06:29 PM
Last Post: paulo79
  search a list or tuple for a specific type ot class Skaperen 8 1,854 Jul-22-2022, 10:29 PM
Last Post: Skaperen
  TypeError: float() argument must be a string or a number, not 'list' Anldra12 2 4,763 Jul-01-2022, 01:23 PM
Last Post: deanhystad
  TypeError: unsupported opperand type(s) for %: 'int' and 'list' cool_person 7 2,096 May-07-2022, 08:40 AM
Last Post: ibreeden
  TypeError: list indices must be integers or slices, not range Anldra12 2 2,501 Apr-22-2022, 10:56 AM
Last Post: Anldra12

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020