Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python &引用;“地位”:400,”;代码";:&引用;错误的“请求”;API盒_Python_Box Api_Http Status Code 400 - Fatal编程技术网

Python &引用;“地位”:400,”;代码";:&引用;错误的“请求”;API盒

Python &引用;“地位”:400,”;代码";:&引用;错误的“请求”;API盒,python,box-api,http-status-code-400,Python,Box Api,Http Status Code 400,当我试图用API更新文件夹框的描述时,我遇到了一个400错误的请求错误 有人能帮我吗 def put_comment(real_rst1, buffer_id): url = "https://api.box.com/2.0/folders/" + buffer_id[1:-3] #print(url) print(real_rst1) #error in payload payload = {'description': real_r

当我试图用API更新文件夹框的描述时,我遇到了一个400错误的请求错误 有人能帮我吗

def put_comment(real_rst1, buffer_id):
    url = "https://api.box.com/2.0/folders/" + buffer_id[1:-3]
    #print(url)
    print(real_rst1)
    #error in payload
    payload = {'description': real_rst1} 
    headers = {'Authorization': 'Bearer fUpqywpPhJx6YAWu9UW2AVhvMGZ0FAl9'}
    response = requests.request("PUT", url, headers = headers) #data = payload)
    print(response.text.encode('utf8'))

我确信错误来自有效负载线路