title: want to insert api data intodatabase using python ,but it shows error as 'Could not process parameter: str(6875), it must be of type list/tuple/ dict'
body: <p>Error  'Could not process parameter: str( 11429016), it must be of type list/tuple/ dict'</p>
  <pre><code>totalCollectedWeightDate = RestAPI['API']['totalCollectedWeightDate']
  today1 = datetime.now()
  today = today1.strftime(&quot;%Y-%m-%d&quot;)
  year =datetime.strftime(datetime.now() - timedelta(365), '%Y-%m-%d')
  txt6 = totalCollectedWeightDate
  xx6 = txt6.replace(&quot;2021-02-17&quot;,year)
  yy6=xx6.replace(&quot;2022-03-17&quot;,today)
  
  # Generate Access Token
  api_url =AccessTokenAPI
  headers = {&quot;Content-Type&quot;:&quot;application/json&quot;}
  response = requests.post(api_url, data=json.dumps(Body), 
   headers=headers2,verify=False)
  response.json()
  #print(response.json()[&quot;access_token&quot;])    
  
  # getSLAComplaintsData API Response
  auth_token=response.json()[&quot;access_token&quot;]
  hed = {'Authorization': 'Bearer ' + auth_token}
  totalCollectedWeightDateAPI1 =yy6
  response = requests.get(totalCollectedWeightDateAPI1, headers=hed,verify=False)
  r=response.content
  
  print(r)
  print(type(r))
  </code></pre>
  <p>q6 gives me the output as 11429016 which is a string but its showing an error</p>
  <pre><code>q6=str(json.loads(r)['SWM']['data']['dumpweight'])
  print(q6)
  print(type(q6))  
  for totalCollectedWeightDateAPI1 in r:
   c.execute(&quot;&quot;&quot; UPDATE totalCollectedWeightDate22 SET dumpweight=%s &quot;&quot;&quot;, (str(q6)))
  # print(q6)
   
  conn.commit()       
  </code></pre>