2

当我将所有授权数据放入

data = {
  'token': 'XXXXXXXXXXXXXXXXXXXXXXXXXXX',
  'content': 'file',
  'action': 'import',
  'record': '',
  'field': 'record_id',
  'event': '',
  'returnFormat': 'csv',
  'file': '(pycurl.FORM_FILE, file)'
}

我收到错误

h.setopt(ch.HTTPPOST, data.items())

它说

ch.setopt(ch.HTTPPOST, data.items()) 类型错误:setopt 的参数无效

其余代码:

ch.setopt(ch.POST, 1)
ch.setopt(ch.SSL_VERIFYPEER, 0)
ch.setopt(ch.HTTPPOST, data.items())
ch.setopt(ch.WRITEFUNCTION, e.write)
ch.perform()
4

0 回答 0