机器人框架:休息调用给出"unicode object has no attribute copy"错误



我的代码上发生以下错误

${resp}=  Post Request  sw3  https://sw3-   test.test1.com/api/v1/test1/patients
  ...  Content-Type:application/json
  ...  Authorization:authkey02    Accept=application/json

错误如下

KEYWORD ${resp} = RequestsLibrary . Post Request sw3, https://sw3-test.test1.com/api/v1/test1/patients, Content-Type:application/json, Authorization:authkey02, Accept=application/json
Documentation:  
Send a POST request on the session object found using the
Start / End / Elapsed:  20170315 12:08:21.283 / 20170315 12:08:21.285 / 00:00:00.002
12:08:21.283    TRACE   Arguments: [ 'sw3' | 'https://sw3-test.test1.com/api/v1/test1/patients' | 'Content-Type:application/json' | 'Authorization:authkey02' | 'Accept=application/json' ] 
12:08:21.284    FAIL    AttributeError: 'unicode' object has no attribute 'copy'

如果我不使用第三行代码,这工作正常 - 什么给出?

你可以

尝试一下,比如将这些key:value对作为字典标头变量传递。

&{Header}=   Content-Type:application/json    Authorization:authkey02 
   Accept=application/json

${resp} = RequestsLibrary.Post Request  sw3   https://sw3-test.test1.com/api/v1/test1/patients    headers=${Header}

相关内容

最新更新