![](/img/trans.png)
[英]AttributeError: module 'botocore' has no attribute 'session' when following the boto3 quickstart
[英]When running boto3 in muti-threaded code, a botocore.vendored.six.moves has not attribute error is raised
因为对AWS REST API的调用可能会长时间运行(尤其是在处理asyncio
调用时),所以我使用asyncio
与executor
并行化了调用(请参阅此处以了解更多信息)。
但是,当某些呼叫失败(甚至没有失败)时,我会收到此错误:
[ERROR] module 'botocore.vendored.six.moves' has no attribute 'configparser'
没有任何进一步的指示(例如,堆栈跟踪)以找出根本原因。
查看此问题 ,该问题似乎与botocore
嵌入在早期版本中的six
版本有关。
我在我的requirements.txt
添加了以下内容:
botocore==1.7.22
然后运行:
pip install -r requirements.txt
错误消失了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.