Guest User

Untitled

a guest
Aug 31st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "cron.py", line 5, in <module>
  3. instance.conexion("162.144.52.66" ,"bicimoto","7-%H1*Zl~&2,M&d]KD","bicimoto_autopartes" )
  4. File "C:UsersRafaelCDesktopscripts-dbcommun.py", line 84, in conexion
  5. VALUES (%s,%s, %s, %s, %s, %s,%s ,%s,%s,%s)",("no",1,1,clienteid,0,clienteid,"draft",1,clienteid,hoy,hoy))
  6. TypeError: not all arguments converted during string formatting
  7.  
  8. hoy = str(datetime.now())
  9. print hoy
  10. conn = psycopg2.connect(dbname="testing",host = "localhost", user ="jpozzo", password ="bicimoto*")
  11. cur = conn.cursor()
  12. for response in request:
  13. for data in element['orden']:
  14. ids = data['id']
  15. cur.execute("INSERT INTO sale_order (invoice_status, user_id,warehouse_id,partner_shipping_id,amount_total,partner_invoice_id,state,company_id,partner_id,create_date,date_order)
  16. VALUES (%s,%s, %s, %s, %s, %s,%s ,%s,%s,%s)",("no",1,1,clienteid,0,clienteid,"draft",1,clienteid,hoy,hoy))
  17.  
  18. conn.commit()
Add Comment
Please, Sign In to add comment