首页 > 解决方案 > aiobotocore dynamodb 没有属性“has_event_stream_output”

问题描述

尝试使用 asyncio 在 dynamodb 上做一些工作,我的所有操作都返回错误:

AttributeError: 'OperationModel' object has no attribute 'has_event_stream_output'

这是在 aiobotocore/endpoint.py
示例代码级别(甚至可以通过调用 list_tables 使其更简单):

import asyncio
import aiobotocore


async def main(loop):
    session = aiobotocore.get_session(loop=loop)
    table_name = 'testTable'
    async with session.create_client('dynamodb') as client:
        response = await client.describe_table(TableName=table_name)
        print(response)

asyncio.set_event_loop(asyncio.new_event_loop())
loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))

aiobotocore 0.9.2
蟒蛇 3.5

标签: amazon-dynamodbpython-asyncio

解决方案


推荐阅读