Boto CloudSearch on GAE: TypeError: request() got an unexpected keyword argument 'config'

社会主义新天地 提交于 2019-12-24 00:54:14

问题


I'm using Boto 2.8 on GAE to search and index docs to AWS CloudSearch. When I try to index a document I get the following error:

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

Surfing the web suggests there is a version compatibility issue with the request library.

The issue seems to come from lines 189-199 of boto/cloudsearch/document.py

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'})

If I remove "config=request_config", I can successfully index documents and do not get the error. But what are the ramifications of removing the config argument?

来源:https://stackoverflow.com/questions/14719603/boto-cloudsearch-on-gae-typeerror-request-got-an-unexpected-keyword-argument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!