2

我在 GAE 上使用 Boto 2.8 来搜索文档并将其索引到 AWS CloudSearch。当我尝试索引文档时,出现以下错误:

TypeError: request() got an unexpected keyword argument 'config'

网上冲浪表明请求库存在版本兼容性问题。

问题似乎来自 boto/cloudsearch/document.py 的第 189-199 行

request_config = {
        'pool_connections': 20,
        'keep_alive': True,
        'max_retries': 5,
        'pool_maxsize': 50
    }

    r = requests.post(url, data=sdf, config=request_config,
        headers={'Content-Type': 'application/json'})

如果我删除“config=request_config”,我可以成功索引文档并且不会收到错误。但是删除 config 参数的后果是什么?

4

0 回答 0